]> source.dussan.org Git - nextcloud-server.git/commitdiff
LDAP: check first, if requested attribute exists
authorArthur Schiwon <blizzz@owncloud.com>
Fri, 4 May 2012 12:13:23 +0000 (14:13 +0200)
committerArthur Schiwon <blizzz@owncloud.com>
Fri, 4 May 2012 12:13:23 +0000 (14:13 +0200)
apps/user_ldap/lib_ldap.php

index bfe5965d9a3b305dcf84ea67051544b483255f6e..c71c0cb7e543d88a31f1cd4fc4c3f01baafff638 100755 (executable)
@@ -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];