Skip to content

Commit f1c5f12

Browse files
committed
authldap: avoid warning on invalid mapping setup. dokuwiki#4399
1 parent 83bbbbb commit f1c5f12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/plugins/authldap/auth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ protected function fetchUserData($user, $inbind = false)
253253
// $key = array($key=>$regexp), only handles the first key-value
254254
$regexp = current($key);
255255
$key = key($key);
256-
if ($user_result[$key]) foreach ($user_result[$key] as $grpkey => $grp) {
256+
if (is_array($user_result[$key] ?? null)) foreach ($user_result[$key] as $grpkey => $grp) {
257257
if ($grpkey !== 'count' && preg_match($regexp, $grp, $match)) {
258258
if ($localkey == 'grps') {
259259
$info[$localkey][] = $match[1];

0 commit comments

Comments
 (0)