diff --git a/src/controllers/LogViewerController.php b/src/controllers/LogViewerController.php index 03b7d4d..f8cf62a 100644 --- a/src/controllers/LogViewerController.php +++ b/src/controllers/LogViewerController.php @@ -78,8 +78,10 @@ public function index() if (is_array($data['logs']) && count($data['logs']) > 0) { $firstLog = reset($data['logs']); - if (!$firstLog['context'] && !$firstLog['level']) { - $data['standardFormat'] = false; + if ($firstLog) { + if (!$firstLog['context'] && !$firstLog['level']) { + $data['standardFormat'] = false; + } } }