LDAP: check first, if requested attribute exists

This commit is contained in:
Arthur Schiwon 2012-05-04 14:13:23 +02:00
parent 716c5a3c8e
commit 907fa9d85b
1 changed files with 1 additions and 1 deletions

View File

@ -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];