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

Capture des erreurs renvoyées par la fonction ldap_search

parent 3120dc5c
No related branches found
No related tags found
No related merge requests found
......@@ -297,8 +297,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