Skip to content

Commit

Permalink
Fix accessing potentially undefined array key (#179)
Browse files Browse the repository at this point in the history
  • Loading branch information
olebowle authored Apr 29, 2024
1 parent 46d768c commit 177a720
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function __invoke(RequestInterface $request, Connection $connection, stri

return app(MetricsHandler::class)->gather($this->application, 'channel', [
'channel' => $channel,
'info' => ($info = $this->query['info']) ? $info.',occupied' : 'occupied',
'info' => isset($this->query['info']) ? $this->query['info'].',occupied' : 'occupied',
])->then(fn ($channel) => new Response((object) $channel));
}
}

0 comments on commit 177a720

Please sign in to comment.