LSldap : added entries objects check returning search result

This commit is contained in:
Benjamin Renard 2012-08-02 15:26:02 +02:00
parent e3ee3911f2
commit 63d041796b

View file

@ -111,6 +111,10 @@ class LSldap {
}
$retInfos=array();
foreach($ret -> entries() as $entry) {
if (!$entry instanceof Net_LDAP2_Entry) {
LSerror :: addErrorCode('LSldap_02',"LDAP search return an ".get_class($entry).". object");
continue;
}
$retInfos[]=array('dn' => $entry -> dn(), 'attrs' => $entry -> getValues());
}
return $retInfos;