Skip to content

Commit

Permalink
Explicityly check for laravel/framework and debugbar
Browse files Browse the repository at this point in the history
To avoid missing 3rd party package traces
  • Loading branch information
barryvdh authored Mar 3, 2017
1 parent dec5b87 commit e1ee861
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/DataCollector/QueryCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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'];
Expand Down

0 comments on commit e1ee861

Please sign in to comment.