From eda42cece900f7ab1447181146b6e515a671d122 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Sat, 5 May 2012 13:44:54 +0200 Subject: Contacts: Don't try to render invalid properties. --- apps/contacts/lib/vcard.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'apps') diff --git a/apps/contacts/lib/vcard.php b/apps/contacts/lib/vcard.php index 621a3c33c75..eb33d223071 100755 --- a/apps/contacts/lib/vcard.php +++ b/apps/contacts/lib/vcard.php @@ -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; -- cgit v1.2.3