From 5242a78994d85547168db3413df47f93ce182596 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 25 Oct 2022 09:59:56 +0200 Subject: Fix $host var handling to avoid passing null to ldap_connect MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/user_ldap/lib/Wizard.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/user_ldap') diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php index 346ac7a61a6..2ecdce610a7 100644 --- a/apps/user_ldap/lib/Wizard.php +++ b/apps/user_ldap/lib/Wizard.php @@ -1049,8 +1049,8 @@ class Wizard extends LDAPUtility { private function connectAndBind(int $port, bool $tls): bool { //connect, does not really trigger any server communication $host = $this->configuration->ldapHost; - $hostInfo = parse_url($host); - if (!$hostInfo) { + $hostInfo = parse_url((string)$host); + if (!is_string($host) || !$hostInfo) { throw new \Exception(self::$l->t('Invalid Host')); } $this->logger->debug( -- cgit v1.2.3