summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Duedal <hd@onlinecity.dk>2014-11-13 11:27:38 +0100
committerHans Duedal <hd@onlinecity.dk>2014-11-13 11:27:38 +0100
commit2b62a417ef6dd70b7741d2df9287a596b7e0128c (patch)
tree8d5bd14f03bf4ea93b5ebc1640e083d2976df470
parentb2fd472fcb9630e53aebc32a967c85b0d57876ed (diff)
parented4e8aac02b44bfcb28058a255a6c3347532ecb5 (diff)
downloadphp-smpp-2b62a417ef6dd70b7741d2df9287a596b7e0128c.zip
php-smpp-2b62a417ef6dd70b7741d2df9287a596b7e0128c.tar.gz
php-smpp-2b62a417ef6dd70b7741d2df9287a596b7e0128c.tar.bz2
Merge pull request #16 from terox/patch-1
Added to regex a white space in "stat" part for some gateways
-rw-r--r--smppclient.class.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/smppclient.class.php b/smppclient.class.php
index 9c6ea91..a502db0 100644
--- a/smppclient.class.php
+++ b/smppclient.class.php
@@ -1062,7 +1062,7 @@ class SmppDeliveryReceipt extends SmppSms
*/
public function parseDeliveryReceipt()
{
- $numMatches = preg_match('/^id:([^ ]+) sub:(\d{1,3}) dlvrd:(\d{3}) submit date:(\d{10,12}) done date:(\d{10,12}) stat:([A-Z]{7}) err:(\d{2,3}) text:(.*)$/si', $this->message, $matches);
+ $numMatches = preg_match('/^id:([^ ]+) sub:(\d{1,3}) dlvrd:(\d{3}) submit date:(\d{10,12}) done date:(\d{10,12}) stat:([A-Z ]{7}) err:(\d{2,3}) text:(.*)$/si', $this->message, $matches);
if ($numMatches == 0) {
throw new InvalidArgumentException('Could not parse delivery receipt: '.$this->message."\n".bin2hex($this->body));
}