Contacts: Don't try to render invalid properties.

This commit is contained in:
Thomas Tanghus 2012-05-05 13:44:54 +02:00
parent f9aadfff7a
commit eda42cece9
1 changed files with 7 additions and 5 deletions

View File

@ -447,11 +447,13 @@ class OC_Contacts_VCard{
$details = array();
foreach($object->children as $property){
$temp = self::structureProperty($property);
if(array_key_exists($property->name,$details)){
$details[$property->name][] = $temp;
}
else{
$details[$property->name] = array($temp);
if(!is_null($temp)) {
if(array_key_exists($property->name,$details)){
$details[$property->name][] = $temp;
}
else{
$details[$property->name] = array($temp);
}
}
}
return $details;