Skip to content

Commit 0e4c7bf

Browse files
author
robin.kluth
committed
Catch an null given error #2
1 parent 178b4dd commit 0e4c7bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/LdapAuth.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,9 @@ public function searchUser(string $searchFor, $attributes = "", $searchFilter =
380380
// Something is wrong with the search query
381381
if (is_null($this->_l)) {
382382
Yii::warning('ldap_search_error: null', __FUNCTION__);
383+
} else {
384+
Yii::warning('ldap_search_error: ' . ldap_error($this->_l), __FUNCTION__);
383385
}
384-
Yii::warning('ldap_search_error: ' . ldap_error($this->_l), __FUNCTION__);
385386
break;
386387
}
387388
ldap_parse_result($this->_l, $result, $errcode, $matcheddn, $errmsg, $referrals, $controls);

0 commit comments

Comments
 (0)