diff --git a/src/Core.php b/src/Core.php index 82d3896..51e7469 100644 --- a/src/Core.php +++ b/src/Core.php @@ -186,9 +186,8 @@ public function stream() stream_set_timeout($this->getRemote(), 150); // we set an infinite loop while (($packetData = $this->read($this->getRemote())) !== 1) { - // we explode the packet after each footer node - $packetArray = preg_split('/(?<=<\/message>)/', $packetData, -1, PREG_SPLIT_NO_EMPTY); + $packetArray = preg_split('/(?<=<\/message>)/', $packetData, -1); foreach ($packetArray as $packet) { // make sure that the XML received is well formatted $validXML = $this->analyzeData($packet);