refactoring

This commit is contained in:
Roland Gruber 2022-09-25 21:03:44 +02:00
parent 03dd410920
commit 7abfda4f19
2 changed files with 1 additions and 3 deletions

View file

@ -52,7 +52,7 @@ $dynamicSubtrees = '';
$result = ldap_read($_SESSION['ldap']->server(), '', 'objectclass=*', array('+', '*', 'subschemasubentry'), 0, 0, 0, LDAP_DEREF_NEVER); $result = ldap_read($_SESSION['ldap']->server(), '', 'objectclass=*', array('+', '*', 'subschemasubentry'), 0, 0, 0, LDAP_DEREF_NEVER);
if ($result) { if ($result) {
$info = ldap_get_entries($_SESSION['ldap']->server(), $result); $info = ldap_get_entries($_SESSION['ldap']->server(), $result);
if ($info) { if (is_array($info) && is_array($info[0])) {
$info = $info[0]; $info = $info[0];
foreach ($info as $key => $value) { foreach ($info as $key => $value) {
if (is_array($info[$key]) && isset($info[$key]['count'])) { if (is_array($info[$key]) && isset($info[$key]['count'])) {

View file

@ -28,8 +28,6 @@ parameters:
- '#Cannot assign new offset to array<int, string>\|string.#' - '#Cannot assign new offset to array<int, string>\|string.#'
- '#Cannot access offset .* on array\|int.#' - '#Cannot access offset .* on array\|int.#'
- '#Parameter \#1 \$haystack of function strpos expects string, int\|string given.#' - '#Parameter \#1 \$haystack of function strpos expects string, int\|string given.#'
- '#Argument of an invalid type array\|int supplied for foreach, only iterables are supported.#'
- '#Cannot access offset mixed on non-empty-array\|int.#'
- '#Parameter \#1 \$ldap of function ldap_get_values_len expects LDAP\\Connection, resource given.#' - '#Parameter \#1 \$ldap of function ldap_get_values_len expects LDAP\\Connection, resource given.#'
- '#Parameter \#2 \$result of function ldap_first_entry expects LDAP\\Result, array\|LDAP\\Result given.#' - '#Parameter \#2 \$result of function ldap_first_entry expects LDAP\\Result, array\|LDAP\\Result given.#'
- '#Parameter \#1 \$ldap of function ldap_first_entry expects LDAP\\Connection, resource given.#' - '#Parameter \#1 \$ldap of function ldap_first_entry expects LDAP\\Connection, resource given.#'