From fe0b75ccabd1bd7a79f462920cc1c59b203a86a2 Mon Sep 17 00:00:00 2001
From: Arthur Schiwon <blizzz@owncloud.com>
Date: Fri, 27 Jun 2014 20:09:16 +0200
Subject: [PATCH] also adapt result check from readAttribute

---
 apps/user_ldap/group_ldap.php | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php
index af41bf6532..1a35691be8 100644
--- a/apps/user_ldap/group_ldap.php
+++ b/apps/user_ldap/group_ldap.php
@@ -469,8 +469,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
 		}
 
 		//if group really still exists, we will be able to read its objectclass
-		$objcs = $this->access->readAttribute($dn, '');
-		if(!$objcs || empty($objcs)) {
+		if(!is_array($this->access->readAttribute($dn, ''))) {
 			$this->access->connection->writeToCache('groupExists'.$gid, false);
 			return false;
 		}
-- 
GitLab