Skip to content

Commit 7d88e37

Browse files
committed
minor symfony#11321 [HttpKernel] Ensure the storage exists before purging it in ProfilerTest (penyaskito)
This PR was merged into the 2.3 branch. Discussion ---------- [HttpKernel] Ensure the storage exists before purging it in ProfilerTest | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony#11319 | License | MIT | Doc PR | None Commits ------- eb63270 bug symfony#11319 [HttpKernel] Ensure the storage exists before purging it in ProfilerTest
2 parents 37931f4 + eb63270 commit 7d88e37

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,11 @@ protected function setUp()
7979

8080
protected function tearDown()
8181
{
82-
$this->storage->purge();
83-
$this->storage = null;
82+
if (null !== $this->storage) {
83+
$this->storage->purge();
84+
$this->storage = null;
8485

85-
@unlink($this->tmp);
86+
@unlink($this->tmp);
87+
}
8688
}
8789
}

0 commit comments

Comments
 (0)