diff options
Diffstat (limited to 'apps/contacts/ajax/deleteproperty.php')
-rw-r--r-- | apps/contacts/ajax/deleteproperty.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/contacts/ajax/deleteproperty.php b/apps/contacts/ajax/deleteproperty.php index f73758a3676..52adca877f5 100644 --- a/apps/contacts/ajax/deleteproperty.php +++ b/apps/contacts/ajax/deleteproperty.php @@ -48,13 +48,13 @@ if( $addressbook === false || $addressbook['userid'] != OC_USER::getUser()){ exit(); } +$vcard = OC_Contacts_Addressbook::parse($card['carddata']); // Check if the card is valid -if( !OC_Contacts_Addressbook::isValidVObject($card['carddata'])){ +if(is_null($vcard)){ echo json_encode( array( 'status' => 'error', 'data' => array( 'message' => $l10n->t('Unable to parse vCard!')))); exit(); } -$vcard = Sabre_VObject_Reader::read($card['carddata']); $line = null; for($i=0;$i<count($vcard->children);$i++){ if(md5($vcard->children[$i]->serialize()) == $checksum ){ |