Skip to content

Commit

Permalink
fixed #17
Browse files Browse the repository at this point in the history
  • Loading branch information
chaz6chez committed Feb 4, 2024
1 parent 15a6a72 commit 3540aaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Events/Unsubscribe.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function response(Server $pushServer, TcpConnection $connection, array $r
self::unsubscribeChannel($pushServer, $connection, $channel, $channelType);
return;
case CHANNEL_TYPE_PRESENCE:
$userData = json_decode($request['data']['channel_data'], true);
$userData = json_decode($request['data']['channel_data'] ?? '{}', true);
if (!$userData or !isset($userData['user_id'])) {
$pushServer->error($connection,null, 'Bad channel_data');
return;
Expand Down

0 comments on commit 3540aaa

Please sign in to comment.