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

possible global key problem #3

Closed
dotSynergy opened this issue May 13, 2021 · 1 comment
Closed

possible global key problem #3

dotSynergy opened this issue May 13, 2021 · 1 comment

Comments

@dotSynergy
Copy link

to save an headache, i found a bug with the new release and am going to report it

just after upgrading, i got this error:

"message": "williamcruzme\\FCM\\Channels\\FcmChannel::__construct(): Argument #3 ($globalPayload) must be of type array, null given, called in /home/dotsynergy/code/git/laravel/meliver_backend/vendor/williamcruzme/laravel-fcm/src/FCMServiceProvider.php on line 27", "exception": "TypeError", "file": "/home/dotsynergy/code/git/laravel/meliver_backend/vendor/williamcruzme/laravel-fcm/src/Channels/FcmChannel.php", "line": 47,

and looked at the constructor.
apparently when the constructor gets called in FCMServiceProvider.php , the third parameter is forced as config('fcm.payload') , however in the declaration expects an array, and while no config parameter is supplied, the config for fcm.payload is null.
i'd propose a null check in the constructor declaration (since it expects an array but clearly it hasn't)

@dotSynergy
Copy link
Author

nvm, did an env reload with php artisan optimize and it's working, closing

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

No branches or pull requests

1 participant