Browse Source

ensure that factoryClass exisits before instantiation

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
tags/v23.0.0beta1
Arthur Schiwon 3 years ago
parent
commit
12e4484dba
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      lib/private/Server.php

+ 1
- 1
lib/private/Server.php View File

@@ -1031,7 +1031,7 @@ class Server extends ServerContainer implements IServerContainer {
$this->registerService(ILDAPProviderFactory::class, function (ContainerInterface $c) {
$config = $c->get(\OCP\IConfig::class);
$factoryClass = $config->getSystemValue('ldapProviderFactory', null);
if (is_null($factoryClass)) {
if (is_null($factoryClass) || !class_exists($factoryClass)) {
return new NullLDAPProviderFactory($this);
}
/** @var \OCP\LDAP\ILDAPProviderFactory $factory */

Loading…
Cancel
Save