LDAP: error codes can be negative, too

This commit is contained in:
Arthur Schiwon 2013-03-05 13:47:03 +01:00
parent 2b7ff7273d
commit b08894ba77
1 changed files with 1 additions and 1 deletions

View File

@ -650,7 +650,7 @@ abstract class Access {
$linkResources = array_pad(array(), count($base), $link_resource);
$sr = ldap_search($linkResources, $base, $filter, $attr);
$error = ldap_errno($link_resource);
if(!is_array($sr) || $error > 0) {
if(!is_array($sr) || $error != 0) {
\OCP\Util::writeLog('user_ldap',
'Error when searching: '.ldap_error($link_resource).' code '.ldap_errno($link_resource),
\OCP\Util::ERROR);