diff --git a/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php b/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php index 07a80772d6..f6b5585c84 100644 --- a/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php +++ b/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php @@ -119,7 +119,7 @@ class ErrorHandler return; } - unset($this->reservedMemory); + $this->reservedMemory = ''; $type = $error['type']; if (0 === $this->level || !in_array($type, array(E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE))) { return; diff --git a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php index 43dfaff5c5..30d4011ffe 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -136,7 +136,7 @@ class ProfilerListener implements EventSubscriberInterface if ($master) { $this->saveProfiles($profile); - unset($this->children); + $this->children = new \SplObjectStorage(); } }