Skip to content

Commit

Permalink
Issue 776 - Check if we're still collecting in the listen handler (ba…
Browse files Browse the repository at this point in the history
  • Loading branch information
apokryfos authored and barryvdh committed Apr 22, 2018
1 parent 7a91480 commit d723a16
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/LaravelDebugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ function ($level, $message = null, $context = null) use ($logger) {
try {
$db->listen(
function ($query, $bindings = null, $time = null, $connectionName = null) use ($db, $queryCollector) {
if ($this->shouldCollect('db', true)) {
return; // Issue 776 : We've turned off collecting after the listener was attached
}
// Laravel 5.2 changed the way some core events worked. We must account for
// the first argument being an "event object", where arguments are passed
// via object properties, instead of individual arguments.
Expand Down

0 comments on commit d723a16

Please sign in to comment.