From 4de10aca0b2a760f9b76e924e08d5697557c12bc Mon Sep 17 00:00:00 2001 From: hahn <axel.hahn@iml.unibe.ch> Date: Thu, 28 Jul 2022 14:28:56 +0200 Subject: [PATCH] ldap.class: check array of search result --- public_html/deployment/classes/ldap.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public_html/deployment/classes/ldap.class.php b/public_html/deployment/classes/ldap.class.php index 49297e35..0a1a7576 100644 --- a/public_html/deployment/classes/ldap.class.php +++ b/public_html/deployment/classes/ldap.class.php @@ -284,7 +284,7 @@ class imlldap { $aItems = $this->searchUser($sSearchFilter, $aAttributesToGet); - if(count($aItems)==2){ + if(is_array($aItems) && count($aItems)==2){ $this->_w(__FUNCTION__ . ' OK: I got a single result: ' . print_r($aItems[0],1) ); return $aItems[0]; } -- GitLab