fix(user_ldap): Ensure host is a string when checking if `ldapi`

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
pull/41003/head
Ferdinand Thiessen 7 months ago committed by Joas Schilling
parent a630ee8dce
commit b8fbd7721d
No known key found for this signature in database
GPG Key ID: 74434EFE0D2E2205

@ -607,6 +607,7 @@ class Configuration {
* 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://');
}
}

Loading…
Cancel
Save