summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Duedal <hd@onlinecity.dk>2012-07-18 00:00:12 -0700
committerHans Duedal <hd@onlinecity.dk>2012-07-18 00:00:12 -0700
commit5767875021b0a5b17396356b1b0b3b81cddd0824 (patch)
tree8aa2aaa920bc4a8cdfdcebd7ad4f815824afaa4a
parentedcbb1183be7fb02fef6de310b97b76bd48ed222 (diff)
parentdf39e5bfa65a01a07b6529123f6216b2122bbd86 (diff)
downloadphp-smpp-5767875021b0a5b17396356b1b0b3b81cddd0824.zip
php-smpp-5767875021b0a5b17396356b1b0b3b81cddd0824.tar.gz
php-smpp-5767875021b0a5b17396356b1b0b3b81cddd0824.tar.bz2
Merge pull request #4 from dineshcooper/master
Some gateways use 2 digit err value in Delivery Receipt
-rw-r--r--smppclient.class.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/smppclient.class.php b/smppclient.class.php
index 09568fc..8a01a42 100644
--- a/smppclient.class.php
+++ b/smppclient.class.php
@@ -1061,7 +1061,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{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));
}