From c898a8a6c90fd364bf787916c0f6b35d3f6c1c75 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Sun, 10 Jun 2012 20:54:52 +0200 Subject: [PATCH] Contacts: 11th hour fix for invalid VCARD from CardDAV. --- apps/contacts/lib/vcard.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/contacts/lib/vcard.php b/apps/contacts/lib/vcard.php index a8ad695f62..20a9e4afc9 100644 --- a/apps/contacts/lib/vcard.php +++ b/apps/contacts/lib/vcard.php @@ -373,6 +373,10 @@ class OC_Contacts_VCard{ public static function editFromDAVData($aid,$uri,$data){ $oldcard = self::findWhereDAVDataIs($aid,$uri); $card = OC_VObject::parse($data); + if(!$card) { + OCP\Util::writeLog('contacts','OC_Contacts_VCard::editFromDAVData. Unable to parse VCARD, uri: '.$uri,OCP\Util::ERROR); + return false; + } return self::edit($oldcard['id'], $card); }