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

Prevent message with data: "" taking server down #237

Merged
merged 1 commit into from
Aug 3, 2024

Conversation

lee-van-oetz
Copy link
Contributor

A message like:

   1▕ { 
   2▕     "event": "pusher:ping", 
   3▕     "data": "" 
   4▕ } 

results in TypeError:

  Laravel\Reverb\Protocols\Pusher\EventHandler::handle(): Argument #3 ($payload) must be of type array, string given, called in /var/www/html/api/vendor/laravel/reverb/src/Protocols/Pusher/Server.php on line 56

which takes the server down.
This fixes it.

A message like:
```
   1▕ { 
   2▕     "event": "pusher:ping", 
   3▕     "data": "" 
   4▕ } 
```
results in `TypeError`:
```
  Laravel\Reverb\Protocols\Pusher\EventHandler::handle(): Argument laravel#3 ($payload) must be of type array, string given, called in /var/www/html/api/vendor/laravel/reverb/src/Protocols/Pusher/Server.php on line 56
```
which takes the server down.
This fixes it.
@taylorotwell taylorotwell merged commit 3aafb84 into laravel:main Aug 3, 2024
11 checks passed
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