Skip to content
Snippets Groups Projects
Commit 8bca382e authored by David Surville's avatar David Surville
Browse files

Capture des erreurs renvoyées par la fonction ldap_search

parent 11a6a31c
No related branches found
No related tags found
No related merge requests found
......@@ -303,8 +303,10 @@ abstract class AbstractService implements
$filter = $ouFilter . ")$filter)";
}
$resource = $this->getLdap()->getResource();
ErrorHandler::start(E_WARNING);
if (null === $attributes) $search = ldap_search($resource, $basedn, $filter);
else $search = ldap_search($resource, $basedn, $filter, $attributes);
ErrorHandler::stop();
if ($search === false) {
throw new Exception('searching: ' . $filter);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment