Skip to content

Commit

Permalink
Merge pull request barryvdh#350 from FractalizeR-Forks/fix_query_logg…
Browse files Browse the repository at this point in the history
…ing_is_off

[L5] Fix for addon crash when DB::disableQueryLog() was called in a user application
  • Loading branch information
barryvdh committed May 25, 2015
2 parents 94945bb + 58423f2 commit d9abfd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LaravelDebugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ function ($level, $message, $context) use ($logger) {
}
}

if ($this->shouldCollect('db', true) && isset($this->app['db'])) {
if ($this->shouldCollect('db', true) && isset($this->app['db']) && $this->app['db']->logging()) {
$db = $this->app['db'];
if ($debugbar->hasCollector('time') && $this->app['config']->get(
'debugbar.options.db.timeline',
Expand Down

0 comments on commit d9abfd1

Please sign in to comment.