LdapConnection: Properly render logical NOTs with only single expression

fixes #3818
This commit is contained in:
Johannes Meyer 2019-06-05 12:59:36 +02:00
parent 09090bcf9f
commit 40e27f8e2a

View File

@ -5,6 +5,7 @@ namespace Icinga\Protocol\Ldap;
use ArrayIterator; use ArrayIterator;
use Exception; use Exception;
use Icinga\Data\Filter\FilterNot;
use LogicException; use LogicException;
use stdClass; use stdClass;
use Icinga\Application\Config; use Icinga\Application\Config;
@ -1390,7 +1391,7 @@ class LdapConnection implements Selectable, Inspectable
} }
$format = '%1$s(%2$s)'; $format = '%1$s(%2$s)';
if (count($parts) === 1) { if (count($parts) === 1 && ! $filter instanceof FilterNot) {
$format = '%2$s'; $format = '%2$s';
} }
if ($level === 0) { if ($level === 0) {