Skip to content

Commit

Permalink
Delivery Receipt matching - found provider that uses 2 digit err value (
Browse files Browse the repository at this point in the history
  • Loading branch information
devkungfoo committed Jul 18, 2012
1 parent edcbb11 commit df39e5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smppclient.class.php
Expand Up @@ -1061,7 +1061,7 @@ class SmppDeliveryReceipt extends SmppSms
*/ */
public function parseDeliveryReceipt() 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) { if ($numMatches == 0) {
throw new InvalidArgumentException('Could not parse delivery receipt: '.$this->message."\n".bin2hex($this->body)); throw new InvalidArgumentException('Could not parse delivery receipt: '.$this->message."\n".bin2hex($this->body));
} }
Expand Down

0 comments on commit df39e5b

Please sign in to comment.