From a6f92e7e6e9c40c7f3668b138ed7392d6bfd6ff8 Mon Sep 17 00:00:00 2001 From: Glen Sawyer Date: Wed, 30 Sep 2015 22:28:11 -0600 Subject: [PATCH] Bugfix for multiple-contact vCards with Agent data --- vCard.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vCard.php b/vCard.php index b2f0476..9c4c578 100644 --- a/vCard.php +++ b/vCard.php @@ -127,7 +127,8 @@ public function __construct($Path = false, $RawData = false, array $Options = nu // fragment is parsed in a separate vCard object. if ($this -> Mode == self::MODE_MULTIPLE) { - $this -> RawData = explode('BEGIN:VCARD', $this -> RawData); + //Cannot use "explode", because we need to ignore, for example, 'AGENT:BEGIN:VCARD' + $this -> RawData = preg_split('{^BEGIN\:VCARD}miS', $this -> RawData); $this -> RawData = array_filter($this -> RawData); foreach ($this -> RawData as $SinglevCardRawData)