nuovo / vCard-parser

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

Case problem with begin and end tags #35

Open surruk51 opened 6 years ago

surruk51 commented 6 years ago

If the vcf file contains begin:vcard end:vcard

(e.g as exported by Thunderbird) instead of

BEGIN:VCARD END:VCARD

it fails because it tries to split the file using: $this -> RawData = explode( 'BEGIN:VCARD', $this -> RawData);

This can be fixed by changing line 132 of vcard.php to $this -> RawData = preg_split('{^BEGIN\:VCARD}miS', $this -> RawData);