nuovo / vCard-parser

Easier and more concise vCard (.vcf) parser for PHP
http://nuovo.lv/
MIT License
126 stars 56 forks source link

Empty vcard show as valid #8

Open xbgmsharp opened 12 years ago

xbgmsharp commented 12 years ago

Empty vcard are count as valid even so there is no value. Here are 2 samples:

BEGIN:VCARD UID:4165-4FBBCC00-33-9470200.vcf VERSION:3.0 CLASS:PUBLIC PROFILE:VCARD END:VCARD

Or

BEGIN:VCARD VERSION:3.0 PRODID:-//Apple Inc.//Address Book 6.1.2//EN UID:bb332361-6c7e-4782-babd-d7d5a5f158f4 END:VCARD

The count check should return something different than the NB card as there is no value.

xbgmsharp commented 12 years ago

I have been thinking about it, and i could find any other way than compare the entry and ensure they are not the only onee present. It does looks like a good idea as it there is 2 parsing. What do you think would be a good approach to avoid non valid (empty) vcard.