LdapConnection: Access array key only if its set
The key `$controlsReturned[LDAP_CONTROL_PAGEDRESULTS]` can be undefined when `$controls[LDAP_CONTROL_PAGEDRESULTS]['iscritical']` is set to false.
This commit is contained in:
parent
f8c08dbfec
commit
c27ca26dad
|
@ -1020,7 +1020,9 @@ class LdapConnection implements Selectable, Inspectable
|
|||
}
|
||||
} else {
|
||||
ldap_parse_result($ds, $results, $errno, $dn, $errmsg, $refs, $controlsReturned);
|
||||
$cookie = $controlsReturned[LDAP_CONTROL_PAGEDRESULTS]['value']['cookie'];
|
||||
if (isset($controlsReturned[LDAP_CONTROL_PAGEDRESULTS])) {
|
||||
$cookie = $controlsReturned[LDAP_CONTROL_PAGEDRESULTS]['value']['cookie'];
|
||||
}
|
||||
}
|
||||
|
||||
ldap_free_result($results);
|
||||
|
|
Loading…
Reference in New Issue