diff --git a/library/Icinga/Protocol/Ldap/LdapConnection.php b/library/Icinga/Protocol/Ldap/LdapConnection.php index 72850af00..29b4bf700 100644 --- a/library/Icinga/Protocol/Ldap/LdapConnection.php +++ b/library/Icinga/Protocol/Ldap/LdapConnection.php @@ -902,7 +902,7 @@ class LdapConnection implements Selectable, Inspectable $query, array_values($fields), 0, - $serverSorting && $limit ? $offset + $limit : 0 + ($serverSorting || ! $query->hasOrder()) && $limit ? $offset + $limit : 0 ); if ($results === false) { if (ldap_errno($ds) === self::LDAP_NO_SUCH_OBJECT) {