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

Fatal error: Uncaught TypeError: Argument 1 passed to Kreait\Firebase\Messaging\Topic::fromValue() must be of the type string, int given #373

Closed
wants to merge 1 commit into from

Conversation

i3130002
Copy link
Contributor

@i3130002 i3130002 commented Jan 30, 2020

Resolves

Fatal error: Uncaught TypeError: Argument 1 passed to Kreait\Firebase\Messaging\Topic::fromValue() must be of the type string, int given, called in /home/public_html/vendor/kreait/firebase-php/src/Firebase/Messaging/AppInstance.php on line 44 and defined in /home/public_html/vendor/kreait/firebase-php/src/Firebase/Messaging/Topic.php:19 Stack trace: #0 /home/public_html/vendor/kreait/firebase-php/src/Firebase/Messaging/AppInstance.php(44): Kreait\Firebase\Messaging\Topic::fromValue(394511638) #1 /home/public_html/TestFiles/1.php(18): Kreait\Firebase\Messaging\AppInstance::fromRawData(Object(Kreait\Firebase\Messaging\RegistrationToken), Array) #2 {main} thrown in /home/public_html/vendor/kreait/firebase-php/src/Firebase/Messaging/Topic.php on line 19

Happens when subscribed topic happens to be a JSON::Decode Integer

Resolves "Fatal error: Uncaught TypeError: Argument 1 passed to Kreait\Firebase\Messaging\Topic::fromValue() must be of the type string, int given, called in /home/public_html/vendor/kreait/firebase-php/src/Firebase/Messaging/AppInstance.php on line 44 and defined in /home/public_html/vendor/kreait/firebase-php/src/Firebase/Messaging/Topic.php:19 Stack trace: #0 /home/public_html/vendor/kreait/firebase-php/src/Firebase/Messaging/AppInstance.php(44): Kreait\Firebase\Messaging\Topic::fromValue(394511638) kreait#1 /home/public_html/TestFiles/1.php(18): Kreait\Firebase\Messaging\AppInstance::fromRawData(Object(Kreait\Firebase\Messaging\RegistrationToken), Array) kreait#2 {main} thrown in /home/public_html/vendor/kreait/firebase-php/src/Firebase/Messaging/Topic.php on line 19"

Happens when subscribed topic happens to be a JSON::Decode Integer
@i3130002 i3130002 requested a review from jeromegamez as a code owner January 30, 2020 00:39
@jeromegamez
Copy link
Member

Merged with 120906f, thank you! 🌺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants