* type cast. On success lightsms return error code like string. On error return integer.
This commit is contained in:
parent
0d7488b10a
commit
9b2e2d0b4a
@ -129,11 +129,11 @@ final class LightSmsTransport extends AbstractTransport
|
|||||||
}
|
}
|
||||||
|
|
||||||
$phone = $this->escapePhoneNumber($message->getPhone());
|
$phone = $this->escapePhoneNumber($message->getPhone());
|
||||||
if (32 === $content[$phone]['error']) {
|
if (32 === (int)$content[$phone]['error']) {
|
||||||
throw new TransportException('Unable to send the SMS: '.$this->getErrorMsg((int)$content[$phone]['error']), $response);
|
throw new TransportException('Unable to send the SMS: '.$this->getErrorMsg((int)$content[$phone]['error']), $response);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 == $content[$phone]['error']) {
|
if (0 == (int)$content[$phone]['error']) {
|
||||||
$sentMessage = new SentMessage($message, (string) $this);
|
$sentMessage = new SentMessage($message, (string) $this);
|
||||||
$sentMessage->setMessageId($content[$phone]['id_sms']);
|
$sentMessage->setMessageId($content[$phone]['id_sms']);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user