laravel-logger icon indicating copy to clipboard operation
laravel-logger copied to clipboard

500 Error: Trying to access array offset on value of type bool (View: /resources/views/vendor/LaravelLogger/logger/partials/activity-table.blade.php)

Open arborrow opened this issue 4 years ago • 3 comments

Just a heads up, I am seeing this issue creep up on PHP 7.4 - I'm not sure which record is causing thing to get tripped up but if I delete all the records in the table then things work for a little while. It doesn't impact the logging - just the viewing. I was curious if anyone else was seeing this. In my case, it seemed to be getting hung up in the $platform switch around the Macintosh case; however, I am running on Linux. I popped in some dd's to check the status of the various variables (browserVersion, platformIcon, etc.) and everything seems OK. Once I figure out how to reproduce I will provide more details but figured this may have been something you have seen before.

arborrow avatar Sep 09 '20 13:09 arborrow

I was able to put a bandaid on this by adding X11 to line 18 of UserAgentDetails trait: $platforms = 'Windows|iPad|iPhone|Macintosh|Android|BlackBerry|Unix|Linux|X11';

There may be others missing.

enkia avatar Sep 26 '20 19:09 enkia

@enkia - thanks, I just avoided the issue by removing the column from the view altogether but I'll consider adding the X11 option. Would you have time to submit a PR?

arborrow avatar Sep 27 '20 01:09 arborrow

Done! Fixed a couple other PHP 7.4+ errors as well so there are no errors if the regex doesn't match an agent.

enkia avatar Sep 27 '20 20:09 enkia