From 907fa9d85b7a90ef638fc65ec87a0f1f2138ca1e Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Fri, 4 May 2012 14:13:23 +0200 Subject: [PATCH] LDAP: check first, if requested attribute exists --- apps/user_ldap/lib_ldap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/user_ldap/lib_ldap.php b/apps/user_ldap/lib_ldap.php index bfe5965d9a3..c71c0cb7e54 100755 --- a/apps/user_ldap/lib_ldap.php +++ b/apps/user_ldap/lib_ldap.php @@ -406,7 +406,7 @@ class OC_LDAP { $er = ldap_first_entry($cr, $rr); $result = ldap_get_attributes($cr, $er); - if($result[$attr]['count'] > 0){ + if(isset($result[$attr]) && $result[$attr]['count'] > 0){ $values = array(); for($i=0;$i<$result[$attr]['count'];$i++) { $values[] = $result[$attr][$i]; -- 2.39.5