8000 [Notifier] fix firebase error handling · symfony/symfony@ac9c306 · GitHub
[go: up one dir, main page]

Skip to content

Commit ac9c306

Browse files
committed
[Notifier] fix firebase error handling
so the transports doesn't try setting the success message, that doesn't exists.
1 parent 50194ed commit ac9c306

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Notifier/Bridge/Firebase/FirebaseTransport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ protected function doSend(MessageInterface $message): SentMessage
8989

9090
throw new TransportException('Unable to post the Firebase message: '.$errorMessage, $response);
9191
}
92-
if ($jsonContents && isset($jsonContents['results']['error'])) {
93-
throw new TransportException('Unable to post the Firebase message: '.$jsonContents['error'], $response);
92+
if ($jsonContents && isset($jsonContents['results'][0]['error'])) {
93+
throw new TransportException('Unable to post the Firebase message: '.$jsonContents['results'][0]['error'], $response);
9494
}
9595

9696
$success = $response->toArray(false);

0 commit comments

Comments
 (0)
0