10000 bug #25226 [HttpKernel] Fix issue when resetting DumpDataCollector (P… · symfony/symfony@b9fb27c · GitHub
[go: up one dir, main page]

Skip to content

Commit b9fb27c

Browse files
bug #25226 [HttpKernel] Fix issue when resetting DumpDataCollector (Pierstoval)
This PR was merged into the 3.4 branch. Discussion ---------- [HttpKernel] Fix issue when resetting DumpDataCollector | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT Fixes issue when resetting the collector and no stopwatch was provided in the constructor. By the way, current workaround is to `composer require symfony/stopwatch`, so this is not a "big blocker". Commits ------- 159fedc [HttpKernel] Fix issue when resetting DumpDataCollector
2 parents f8d8875 + 159fedc commit b9fb27c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,9 @@ public function collect(Request $request, Response $response, \Exception $except
166166

167167
public function reset()
168168
{
169-
$this->stopwatch->reset();
169+
if ($this->stopwatch) {
170+
$this->stopwatch->reset();
171+
}
170172
$this->data = array();
171173
$this->dataCount = 0;
172174
$this->isCollected = false;

0 commit comments

Comments
 (0)
0