From 6591907ac894b7c56415df599dc7891ae232d071 Mon Sep 17 00:00:00 2001 From: Vittal Aithal <v@aithal.org> Date: Mon, 15 Jan 2018 11:39:31 +0000 Subject: [PATCH] Use !empty rather than is_array This picks up the case where the memberof attribute is an empty array as well as not being an array --- modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php b/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php index 6453db2aa..33fb39194 100644 --- a/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php +++ b/modules/ldap/lib/Auth/Process/AttributeAddUsersGroups.php @@ -263,7 +263,7 @@ class sspmod_ldap_Auth_Process_AttributeAddUsersGroups extends sspmod_ldap_Auth_ $groups[] = $dn; // Recursively search "sub" groups - if (is_array($attributes[$map['memberof']])) { + if (!empty($attributes[$map['memberof']])) { $groups = array_merge($groups, $this->search($attributes[$map['memberof']])); } } -- GitLab