Skip to content

Commit 9b2e2d0

Browse files
committed
* type cast. On success lightsms return error code like string. On error return integer.
1 parent 0d7488b commit 9b2e2d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ protected function doSend(MessageInterface $message): SentMessage
129129
}
130130

131131
$phone = $this->escapePhoneNumber($message->getPhone());
132-
if (32 === $content[$phone]['error']) {
132+
if (32 === (int)$content[$phone]['error']) {
133133
throw new TransportException('Unable to send the SMS: '.$this->getErrorMsg((int)$content[$phone]['error']), $response);
134134
}
135135

136-
if (0 == $content[$phone]['error']) {
136+
if (0 == (int)$content[$phone]['error']) {
137137
$sentMessage = new SentMessage($message, (string) $this);
138138
$sentMessage->setMessageId($content[$phone]['id_sms']);
139139

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy