Skip to content

Commit

Permalink
fix #166
Browse files Browse the repository at this point in the history
Fix #166
  • Loading branch information
rap2hpoutre authored Aug 18, 2018
1 parent 45872ed commit 201db49
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/controllers/LogViewerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ public function index()
return $data;
}

$firstLog = reset($data['logs']);
if (!$firstLog['context'] && !$firstLog['level']) {
$data['standardFormat'] = false;
if (is_array($data['logs'])) {
$firstLog = reset($data['logs']);
if (!$firstLog['context'] && !$firstLog['level']) {
$data['standardFormat'] = false;
}
}

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

0 comments on commit 201db49

Please sign in to comment.