Skip to content

Commit d723a16

Browse files
apokryfosbarryvdh
authored andcommitted
Issue 776 - Check if we're still collecting in the listen handler (#823)
1 parent 7a91480 commit d723a16

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/LaravelDebugbar.php

+3
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,9 @@ function ($level, $message = null, $context = null) use ($logger) {
319319
try {
320320
$db->listen(
321321
function ($query, $bindings = null, $time = null, $connectionName = null) use ($db, $queryCollector) {
322+
if ($this->shouldCollect('db', true)) {
323+
return; // Issue 776 : We've turned off collecting after the listener was attached
324+
}
322325
// Laravel 5.2 changed the way some core events worked. We must account for
323326
// the first argument being an "event object", where arguments are passed
324327
// via object properties, instead of individual arguments.

0 commit comments

Comments
 (0)