From 1f3375695c278cdf21a79ae2445b43fc73c25da7 Mon Sep 17 00:00:00 2001 From: Guilherme Blanco Date: Tue, 17 Jul 2012 00:00:12 -0300 Subject: [PATCH] Update master --- .../HttpKernel/EventListener/ProfilerListener.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php index 0175d2021b..089dcf9610 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -117,9 +117,12 @@ class ProfilerListener implements EventSubscriberInterface array_pop($this->requests); $parent = end($this->requests); - $profiles = isset($this->children[$parent]) ? $this->children[$parent] : array(); - $profiles[] = $profile; - $this->children[$parent] = $profiles; + + if ($parent) { + $profiles = isset($this->children[$parent]) ? $this->children[$parent] : array(); + $profiles[] = $profile; + $this->children[$parent] = $profiles; + } } if (isset($this->children[$request])) {