mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-26 11:52:59 +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 {
|
else {
|
||||||
// Otherwise, just retreive number of matching objets
|
// 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
|
// Check result
|
||||||
|
@ -542,6 +547,12 @@ class LSldapObject extends LSlog_staticLoggerClass {
|
||||||
$retval = false;
|
$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
|
// Validation using external function
|
||||||
else if(isset($test['function'])) {
|
else if(isset($test['function'])) {
|
||||||
|
|
Loading…
Reference in a new issue