From e1ee861ebaab6537dbe295a13deba55f6bb677ec Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Fri, 3 Mar 2017 09:36:40 +0100 Subject: [PATCH] Explicityly check for laravel/framework and debugbar To avoid missing 3rd party package traces --- src/DataCollector/QueryCollector.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/DataCollector/QueryCollector.php b/src/DataCollector/QueryCollector.php index ec1baff9..6f6d7df6 100644 --- a/src/DataCollector/QueryCollector.php +++ b/src/DataCollector/QueryCollector.php @@ -201,7 +201,7 @@ protected function findSource() * * @param int $index * @param array $trace - * @return array|bool + * @return object|bool */ protected function parseTrace($index, array $trace) { @@ -220,7 +220,10 @@ protected function parseTrace($index, array $trace) if (isset($trace['class']) && isset($trace['file']) && strpos( $trace['file'], - DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR + DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'laravel' . DIRECTORY_SEPARATOR . 'framework' + ) === false && strpos( + $trace['file'], + DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'barryvdh' . DIRECTORY_SEPARATOR . 'laravel-debugbar' ) === false ) { $file = $trace['file'];