Skip to content

Commit e4bc8fd

Browse files
committed
Prevent adding collectors twice
1 parent 0de8f95 commit e4bc8fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/LaravelDebugbar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ public function modifyResponse(Request $request, Response $response)
506506
$httpDriver = new SymfonyHttpDriver($sessionManager, $response);
507507
$this->setHttpDriver($httpDriver);
508508

509-
if ($this->shouldCollect('session')) {
509+
if ($this->shouldCollect('session') && ! $this->hasCollector('session')) {
510510
try {
511511
$this->addCollector(new SessionCollector($sessionManager));
512512
} catch (\Exception $e) {
@@ -537,7 +537,7 @@ public function modifyResponse(Request $request, Response $response)
537537
}
538538
}
539539

540-
if ($app['config']->get('debugbar.clockwork')) {
540+
if ($app['config']->get('debugbar.clockwork') && ! $this->hasCollector('clockwork')) {
541541

542542
try {
543543
$this->addCollector(new ClockworkCollector($request, $response, $sessionManager));

0 commit comments

Comments
 (0)