Skip to content

Commit 1d8ad1d

Browse files
committed
minor #40735 [Notifier] LightSMS duplicated $errorCode variable fix (StaffNowa)
This PR was squashed before being merged into the 5.3-dev branch. Discussion ---------- [Notifier] LightSMS duplicated $errorCode variable fix | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | Fix #40712, #40733 | License | MIT | Doc PR | - Removed duplicated variable $errorCode. Many thanks for: @OskarStark, @jderusse and special thanks for @chalasr for fast rebase course at night :))) Commits ------- 867769e [Notifier] LightSMS duplicated $errorCode variable fix
2 parents ddb48bb + 867769e commit 1d8ad1d

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
@@ -124,8 +124,8 @@ protected function doSend(MessageInterface $message): SentMessage
124124

125125
$content = $response->toArray(false);
126126

127-
if (0 !== (int) ($content['error'] ?? $content['']['error'] ?? $content[$phone]['error']) ?? -1) {
128-
$errorCode = (int) ($content['error'] ?? $content['']['error'] ?? $content[$phone]['error']) ?? -1;
127+
$errorCode = (int) ($content['error'] ?? $content['']['error'] ?? $content[$phone]['error']) ?? -1;
128+
if (0 !== $errorCode) {
129129
if (-1 === $errorCode) {
130130
throw new TransportException('Unable to send the SMS.', $response);
131131
}

0 commit comments

Comments
 (0)