Skip to content

Commit

Permalink
Prevent adding collectors twice
Browse files Browse the repository at this point in the history
  • Loading branch information
barryvdh committed Apr 16, 2016
1 parent 0de8f95 commit e4bc8fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LaravelDebugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ public function modifyResponse(Request $request, Response $response)
$httpDriver = new SymfonyHttpDriver($sessionManager, $response);
$this->setHttpDriver($httpDriver);

if ($this->shouldCollect('session')) {
if ($this->shouldCollect('session') && ! $this->hasCollector('session')) {
try {
$this->addCollector(new SessionCollector($sessionManager));
} catch (\Exception $e) {
Expand Down Expand Up @@ -537,7 +537,7 @@ public function modifyResponse(Request $request, Response $response)
}
}

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

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

0 comments on commit e4bc8fd

Please sign in to comment.