diff options
author | Hans Duedal <hd@onlinecity.dk> | 2011-03-26 12:29:47 +0100 |
---|---|---|
committer | Hans Duedal <hd@onlinecity.dk> | 2011-03-26 12:29:47 +0100 |
commit | 37f771eb60761edaba05ede5137b714fca911620 (patch) | |
tree | 3ba454553cc1149aae996180279765f3ab9fd374 | |
parent | 27543c831abf19c819234812ba45a3c0606fe405 (diff) | |
parent | e877870dd01849b908b5621260edf05630df9d65 (diff) | |
download | php-smpp-37f771eb60761edaba05ede5137b714fca911620.zip php-smpp-37f771eb60761edaba05ede5137b714fca911620.tar.gz php-smpp-37f771eb60761edaba05ede5137b714fca911620.tar.bz2 |
Merge branch 'develop'
-rw-r--r-- | gateway/protocol/smppclient.class.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gateway/protocol/smppclient.class.php b/gateway/protocol/smppclient.class.php index 6c4de5b..d7aedab 100644 --- a/gateway/protocol/smppclient.class.php +++ b/gateway/protocol/smppclient.class.php @@ -920,8 +920,10 @@ class DeliveryReceipt extends SMS */ public function parseDeliveryReceipt() { - $numMatches = preg_match('/^id:([^ ]+) sub:(\d{1,3}) dlvrd:(\d{3}) submit date:(\d{10}) done date:(\d{10}) stat:([A-Z]{7}) err:(\d{3}) text:(.*)$/', $this->message, $matches); - if ($numMatches == 0) throw new \InvalidArgumentException('Could not parse delivery receipt'); + $numMatches = preg_match('/^id:([^ ]+) sub:(\d{1,3}) dlvrd:(\d{3}) submit date:(\d{10}) done date:(\d{10}) stat:([A-Z]{7}) err:(\d{3}) text:(.*)$/ms', $this->message, $matches); + if ($numMatches == 0) { + throw new \InvalidArgumentException('Could not parse delivery receipt: '.$this->message."\n".bin2hex($this->body)); + } list($matched, $this->id, $this->sub, $this->dlvrd, $this->submitDate, $this->doneDate, $this->stat, $this->err, $this->text) = $matches; // Convert dates |