mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +01:00
LSldapObject::validateAttrData(): check return type of LSldap::getNumberResult()
This commit is contained in:
parent
89ecbb8a5c
commit
06b8fddc51
1 changed files with 12 additions and 1 deletions
|
@ -524,7 +524,12 @@ class LSldapObject extends LSlog_staticLoggerClass {
|
|||
}
|
||||
else {
|
||||
// Otherwise, just retreive number of matching objets
|
||||
$ret=LSldap :: getNumberResult($sfilter, $sbasedn, $sparams);
|
||||
$ret = LSldap :: getNumberResult($sfilter, $sbasedn, $sparams);
|
||||
if (!is_int($ret)) {
|
||||
// An error occured
|
||||
$retval = false;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Check result
|
||||
|
@ -542,6 +547,12 @@ class LSldapObject extends LSlog_staticLoggerClass {
|
|||
$retval = false;
|
||||
}
|
||||
}
|
||||
|
||||
self :: log_trace(
|
||||
"validateAttrData(".$LSform->idForm.", ".$attr->name."): ".
|
||||
"validation with LDAP search on base DN='$sbasedn' and ".
|
||||
"filter='".$sfilter->as_string()."' success ($ret object(s) found)"
|
||||
);
|
||||
}
|
||||
// Validation using external function
|
||||
else if(isset($test['function'])) {
|
||||
|
|
Loading…
Reference in a new issue