stepanenko3 / nova-logs-tool

A Laravel Nova tool to manage and keep track of each one of your logs files.
MIT License
26 stars 11 forks source link

Undefined array key 1 #11

Closed nw-mjl closed 1 year ago

nw-mjl commented 2 years ago

[2022-08-29 11:44:34] local.ERROR: Undefined array key 1 {"userId":1,"exception":"[object] (ErrorException(code: 0): Undefined array key 1 at /var/www/html/vendor/stepanenko3/laravel-log-viewer/src/Helpers/Log.php:48)

stepanenko3 commented 2 years ago

Hi, @nw-mjl Send your log file, pls

hardcod3r commented 2 years ago

Attempt to read property "name" on null {"userId":1,"exception":"[object] (ErrorException(code: 0): Attempt to read property \"name\" on null at /var/www/clients/client0/web1/web/vendor/stepanenko3/nova-logs-tool/src/Http/Controllers/LogsController.php:41)

if (!$file) { $file = $files->first()->name; //$files->first() is null }

abordage commented 2 years ago

@stepanenko3, this is the same as #6

stepanenko3 commented 1 year ago

@hardcod3r @abordage @nw-mjl Fixed in https://github.com/stepanenko3/nova-logs-tool/releases/tag/v2.1.0