Skip to content

Commit

Permalink
Catch an null given error #2
Browse files Browse the repository at this point in the history
  • Loading branch information
robin.kluth committed Jan 13, 2022
1 parent 178b4dd commit 0e4c7bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/LdapAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0e4c7bf

Please sign in to comment.