laravel / horizon

Dashboard and code-driven configuration for Laravel queues.
https://laravel.com/docs/horizon
MIT License
3.84k stars 645 forks source link

fix: undefined array key 'queue' #1351

Closed TomaszOnePilot closed 9 months ago

TomaszOnePilot commented 9 months ago

I had some crashes in MasterSupervisorController. In fact, it seems like in the case where $value is an array that has no queue key, it's failing because we are still trying to access this key. I think the parenthesis were probably added by mistake, as coalescing ( ?? ) operator cannot be applied "directly" on $value['queue'].

For reproducing matter, I don't really know how to reproduce it, it seems like it sometimes enters in this code, but not always. And in fact we are not running any queued job in the route where it fails, maybe some redis usage around session or cache, but no custom application queued jobs that could trigger horizon, so it is quite mysterious for me.

Capture d’écran 2023-11-23 à 16 39 17