diff --git a/apps/user_ldap/lib/Configuration.php b/apps/user_ldap/lib/Configuration.php index 36258f5ad271b..aa2a125d52206 100644 --- a/apps/user_ldap/lib/Configuration.php +++ b/apps/user_ldap/lib/Configuration.php @@ -604,6 +604,7 @@ public function getAvatarAttributes(): array { * Returns TRUE if the ldapHost variable starts with 'ldapi://' */ public function usesLdapi(): bool { - return (substr($this->config['ldapHost'], 0, strlen('ldapi://')) === 'ldapi://'); + $host = $this->config['ldapHost']; + return is_string($host) && (substr($host, 0, strlen('ldapi://')) === 'ldapi://'); } }