nuovo / vCard-parser

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

Unable to parse multiple contacts in single Vcard #31

Open boominathanp7 opened 7 years ago

boominathanp7 commented 7 years ago

If upload a vcard with multiple contacts shows error message Fatal error: Uncaught exception 'Exception' with message 'vCard: invalid vCard'

matthiasvdh commented 7 years ago

Got the same error here. In my case it was a VCF file that started with a Byte-Order Mark.

Open the source file with a hexeditor and check if it starts with the ascii bytes 'BEGIN' (good) or has the hexadecimal bytes 'ef bb bf'.

See https://en.wikipedia.org/wiki/Byte_order_mark for more information.

We worked around this issue by not passing the BOM to the vCard() constructor.