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

🚑 fix(ObjectsAttribute) Catch EmptyFilterException

issue #6083
parent d9f90f6c
......@@ -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);
......
Markdown is supported
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