From 1dfd87193444395f2fa6e3d9b5adad632255db38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Huchet?= Date: Wed, 4 May 2022 09:15:25 +0200 Subject: [PATCH] fix: fix #256 --- src/controllers/LogViewerController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; + } } }