Skip to content

Commit 201db49

Browse files
authored
fix #166
Fix #166
1 parent 45872ed commit 201db49

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/controllers/LogViewerController.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ public function index()
6767
return $data;
6868
}
6969

70-
$firstLog = reset($data['logs']);
71-
if (!$firstLog['context'] && !$firstLog['level']) {
72-
$data['standardFormat'] = false;
70+
if (is_array($data['logs'])) {
71+
$firstLog = reset($data['logs']);
72+
if (!$firstLog['context'] && !$firstLog['level']) {
73+
$data['standardFormat'] = false;
74+
}
7375
}
7476

7577
return app('view')->make('laravel-log-viewer::log', $data);

0 commit comments

Comments
 (0)