Contacts: check for malformed VCards in calendar hook

This commit is contained in:
Bart Visscher 2012-05-02 21:34:34 +02:00
parent ec98ecff05
commit f7e410147f
1 changed files with 3 additions and 0 deletions

View File

@ -64,6 +64,9 @@ class OC_Contacts_Hooks{
OC_Contacts_App::getAddressbook($aid);
foreach(OC_Contacts_VCard::all($aid) as $card){
$vcard = OC_VObject::parse($card['carddata']);
if (!$vcard) {
continue;
}
$birthday = $vcard->BDAY;
if ($birthday) {
$date = new DateTime($birthday);