diff options
-rw-r--r-- | lib/plugins/authldap/auth.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/plugins/authldap/auth.php b/lib/plugins/authldap/auth.php index 346139513..2d3e57d00 100644 --- a/lib/plugins/authldap/auth.php +++ b/lib/plugins/authldap/auth.php @@ -253,7 +253,7 @@ class auth_plugin_authldap extends AuthPlugin // $key = array($key=>$regexp), only handles the first key-value $regexp = current($key); $key = key($key); - if ($user_result[$key]) foreach ($user_result[$key] as $grpkey => $grp) { + if (is_array($user_result[$key] ?? null)) foreach ($user_result[$key] as $grpkey => $grp) { if ($grpkey !== 'count' && preg_match($regexp, $grp, $match)) { if ($localkey == 'grps') { $info[$localkey][] = $match[1]; |