From 0e4c7bfe65f9062b549facfb30b76c0821b1b758 Mon Sep 17 00:00:00 2001 From: "robin.kluth" Date: Thu, 13 Jan 2022 10:47:43 +0100 Subject: [PATCH] Catch an `null given` error #2 --- src/LdapAuth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/LdapAuth.php b/src/LdapAuth.php index fd1d03b..215a97f 100644 --- a/src/LdapAuth.php +++ b/src/LdapAuth.php @@ -380,8 +380,9 @@ public function searchUser(string $searchFor, $attributes = "", $searchFilter = // Something is wrong with the search query if (is_null($this->_l)) { Yii::warning('ldap_search_error: null', __FUNCTION__); + } else { + Yii::warning('ldap_search_error: ' . ldap_error($this->_l), __FUNCTION__); } - Yii::warning('ldap_search_error: ' . ldap_error($this->_l), __FUNCTION__); break; } ldap_parse_result($this->_l, $result, $errcode, $matcheddn, $errmsg, $referrals, $controls);