Skip to content
Snippets Groups Projects
Commit b08894ba authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

LDAP: error codes can be negative, too

parent 2b7ff727
No related branches found
No related tags found
No related merge requests found
...@@ -650,7 +650,7 @@ abstract class Access { ...@@ -650,7 +650,7 @@ abstract class Access {
$linkResources = array_pad(array(), count($base), $link_resource); $linkResources = array_pad(array(), count($base), $link_resource);
$sr = ldap_search($linkResources, $base, $filter, $attr); $sr = ldap_search($linkResources, $base, $filter, $attr);
$error = ldap_errno($link_resource); $error = ldap_errno($link_resource);
if(!is_array($sr) || $error > 0) { if(!is_array($sr) || $error != 0) {
\OCP\Util::writeLog('user_ldap', \OCP\Util::writeLog('user_ldap',
'Error when searching: '.ldap_error($link_resource).' code '.ldap_errno($link_resource), 'Error when searching: '.ldap_error($link_resource).' code '.ldap_errno($link_resource),
\OCP\Util::ERROR); \OCP\Util::ERROR);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment