Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Notifier] Update FirebaseTransport.php #43073

Merged
merged 1 commit into from
Sep 19, 2021
Merged

[Notifier] Update FirebaseTransport.php #43073

merged 1 commit into from
Sep 19, 2021

Conversation

dima-gr
Copy link
Contributor

@dima-gr dima-gr commented Sep 17, 2021

prevent setting null value from firebase response, previous pull request - #43040

Q A
Branch? 5.4 for features / 4.4 or 5.3 for bug fixes
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #...
License MIT
Doc PR symfony/symfony-docs#...

@carsonbot carsonbot changed the title Update FirebaseTransport.php [Notifier] Update FirebaseTransport.php Sep 17, 2021
@@ -96,7 +96,7 @@ protected function doSend(MessageInterface $message): SentMessage
$success = $response->toArray(false);

$sentMessage = new SentMessage($message, (string) $this);
$sentMessage->setMessageId($success['results'][0]['message_id']);
$sentMessage->setMessageId($success['results'][0]['message_id'] ?? '');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's wrap this in an if Statement and do not call the setMessageId method

@OskarStark OskarStark added this to the 5.3 milestone Sep 17, 2021
@fabpot
Copy link
Member

fabpot commented Sep 19, 2021

Thank you @dima-gr.

@fabpot fabpot merged commit 99be574 into symfony:5.3 Sep 19, 2021
@OskarStark
Copy link
Contributor

Now one need to check for null and empty string.

I am still in favor of not calling the method to only return a string when it is a valid message id.

WDYT @fabpot

@fabpot fabpot mentioned this pull request Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants