From b8fbd7721d25f9863d452db91fb3823108641dfa Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sat, 21 Oct 2023 04:00:24 +0200 Subject: [PATCH] fix(user_ldap): Ensure host is a string when checking if `ldapi` Signed-off-by: Ferdinand Thiessen --- apps/user_ldap/lib/Configuration.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/user_ldap/lib/Configuration.php b/apps/user_ldap/lib/Configuration.php index 43d7b5cfbf1..b009ba3f480 100644 --- a/apps/user_ldap/lib/Configuration.php +++ b/apps/user_ldap/lib/Configuration.php @@ -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://'); } } -- 2.39.5