Skip to content

Commit

Permalink
minor #32428 [Stopwatch] Fix missing deprecations (yceruto)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.4 branch.

Discussion
----------

[Stopwatch] Fix missing deprecations

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | no needed

Fix #32408

Commits
-------

527bf89 Fix missing deprecations
  • Loading branch information
fabpot committed Jul 8, 2019
2 parents e1cea97 + 527bf89 commit 350ec6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TraceableEventDispatcherTest extends TestCase
public function testStopwatchSections()
{
$dispatcher = new TraceableEventDispatcher(new EventDispatcher(), $stopwatch = new Stopwatch());
$kernel = $this->getHttpKernel($dispatcher, function () { return new Response(); });
$kernel = $this->getHttpKernel($dispatcher, function () { return new Response('', 200, ['X-Debug-Token' => '292e1e']); });
$request = Request::create('/');
$response = $kernel->handle($request);
$kernel->terminate($request, $response);
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Stopwatch/Section.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function get($id)
*/
public function open($id)
{
if (null === $session = $this->get($id)) {
if (null === $id || null === $session = $this->get($id)) {
$session = $this->children[] = new self(microtime(true) * 1000, $this->morePrecision);
}

Expand Down

0 comments on commit 350ec6c

Please sign in to comment.