Skip to content

Commit 3ec1aeb

Browse files
committed
[L4] Fix for crash when attempting to explain non-mysql queries
1 parent 673a9c5 commit 3ec1aeb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/LaravelDebugBar.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ function ($level, $message, $context) use ($logger) {
283283
$queryCollector->setFindSource(true);
284284
}
285285

286-
if ($this->app['config']->get('laravel-debugbar::config.options.db.explain.enabled')) {
286+
if ($this->app['config']->get('laravel-debugbar::config.options.db.explain.enabled') && ($this->app['db']->getDriverName( ) == 'mysql')
287+
) {
287288
$types = $this->app['config']->get('laravel-debugbar::config.options.db.explain.types');
288289
$queryCollector->setExplainSource(true, $types);
289290
}

0 commit comments

Comments
 (0)