Unverified Commit 90c55cf7 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

:ambulance: fix(ObjectsAttribute) Catch EmptyFilterException

issue #6083
Showing with 8 additions and 4 deletions
+8 -4
......@@ -91,10 +91,14 @@ class ObjectsAttribute extends GenericDialogAttribute
protected function fillDisplayValue ($i)
{
$value = $this->value[$i];
if ($this->store_attr == 'dn') {
$objects = objects::ls($this->selectManagementParameters[0], $this->selectManagementParameters[2], $value, '', FALSE, 'base');
} else {
$objects = objects::ls($this->selectManagementParameters[0], $this->selectManagementParameters[2], NULL, '('.$this->store_attr.'='.ldap_escape_f($value).')');
try {
if ($this->store_attr == 'dn') {
$objects = objects::ls($this->selectManagementParameters[0], $this->selectManagementParameters[2], $value, '', FALSE, 'base');
} else {
$objects = objects::ls($this->selectManagementParameters[0], $this->selectManagementParameters[2], NULL, '('.$this->store_attr.'='.ldap_escape_f($value).')');
}
} catch (EmptyFilterException $e) {
$objects = [];
}
if (empty($objects) && $this->isTemplate()) {
$this->fillDisplayValueFrom($i, NULL);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment