Skip to content

Commit

Permalink
Fix for addon crash when DB::disableQueryLog() was called in a user a…
Browse files Browse the repository at this point in the history
…pplication
  • Loading branch information
FractalizeR committed May 25, 2015
1 parent 94945bb commit 58423f2
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 58423f2

Please sign in to comment.