From d3c7471eac59afe6f2924afe5ab45765e4e2d534 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Thu, 21 Jun 2007 21:46:36 +0200 Subject: [PATCH] check for empty group array in LDAP backend FS#1004 darcs-hash:20070621194636-7ad00-0a02dabd55d9bda3bf07b1eb8bcfdefd832c2df9.gz --- inc/auth/ldap.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/auth/ldap.class.php b/inc/auth/ldap.class.php index 765ed7c72..9fcdc171f 100644 --- a/inc/auth/ldap.class.php +++ b/inc/auth/ldap.class.php @@ -192,7 +192,7 @@ class auth_ldap extends auth_basic { if(is_array($key)) { // use regexp to clean up user_result list($key, $regexp) = each($key); - foreach($user_result[$key] as $grp){ + if($user_result[$key]) foreach($user_result[$key] as $grp){ if (preg_match($regexp,$grp,$match)) { if($localkey == 'grps') { $info[$localkey][] = $match[1]; -- GitLab