diff --git a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php index 089dcf9610..5b2228ba1a 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -117,7 +117,8 @@ class ProfilerListener implements EventSubscriberInterface array_pop($this->requests); $parent = end($this->requests); - + + // when simulating requests, we might not have the parent if ($parent) { $profiles = isset($this->children[$parent]) ? $this->children[$parent] : array(); $profiles[] = $profile;