From eb63270bab655190548f8c43d35b4e0177a7a734 Mon Sep 17 00:00:00 2001 From: Christian Lopez Espinola Date: Sat, 5 Jul 2014 17:36:34 +0200 Subject: [PATCH] bug #11319 [HttpKernel] Ensure the storage exists before purging it in ProfilerTest --- .../Component/HttpKernel/Tests/Profiler/ProfilerTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php b/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php index bf9724aa2a..eee1a36658 100644 --- a/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/Profiler/ProfilerTest.php @@ -79,9 +79,11 @@ class ProfilerTest extends \PHPUnit_Framework_TestCase protected function tearDown() { - $this->storage->purge(); - $this->storage = null; + if (null !== $this->storage) { + $this->storage->purge(); + $this->storage = null; - @unlink($this->tmp); + @unlink($this->tmp); + } } }