mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-07 21:05:18 +02:00
LdapConnection: Prefer strict checks when utilizing in_array()
This commit is contained in:
parent
6c07881466
commit
666e67b405
@ -695,7 +695,7 @@ class LdapConnection implements Selectable, Inspectable
|
||||
));
|
||||
} else {
|
||||
foreach ($query->getOrder() as $rule) {
|
||||
if (! in_array($rule[0], $fields)) {
|
||||
if (! in_array($rule[0], $fields, true)) {
|
||||
$fields[] = $rule[0];
|
||||
}
|
||||
}
|
||||
@ -812,7 +812,7 @@ class LdapConnection implements Selectable, Inspectable
|
||||
$serverSorting = false;//$this->getCapabilities()->hasOid(LdapCapabilities::LDAP_SERVER_SORT_OID);
|
||||
if (! $serverSorting && $query->hasOrder()) {
|
||||
foreach ($query->getOrder() as $rule) {
|
||||
if (! in_array($rule[0], $fields)) {
|
||||
if (! in_array($rule[0], $fields, true)) {
|
||||
$fields[] = $rule[0];
|
||||
}
|
||||
}
|
||||
@ -858,7 +858,8 @@ class LdapConnection implements Selectable, Inspectable
|
||||
} elseif (ldap_count_entries($ds, $results) === 0) {
|
||||
if (in_array(
|
||||
ldap_errno($ds),
|
||||
array(static::LDAP_SIZELIMIT_EXCEEDED, static::LDAP_ADMINLIMIT_EXCEEDED)
|
||||
array(static::LDAP_SIZELIMIT_EXCEEDED, static::LDAP_ADMINLIMIT_EXCEEDED),
|
||||
true
|
||||
)) {
|
||||
Logger::warning(
|
||||
'Unable to request more than %u results. Does the server allow paged search requests? (%s)',
|
||||
|
Loading…
x
Reference in New Issue
Block a user