Contacts: 11th hour fix for invalid VCARD from CardDAV.

This commit is contained in:
Thomas Tanghus 2012-06-10 20:54:52 +02:00
parent cdac0eae46
commit c898a8a6c9
1 changed files with 4 additions and 0 deletions

View File

@ -373,6 +373,10 @@ class OC_Contacts_VCard{
public static function editFromDAVData($aid,$uri,$data){ public static function editFromDAVData($aid,$uri,$data){
$oldcard = self::findWhereDAVDataIs($aid,$uri); $oldcard = self::findWhereDAVDataIs($aid,$uri);
$card = OC_VObject::parse($data); $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); return self::edit($oldcard['id'], $card);
} }