From 6f1df3338d3976ba2b46fe4913f90e6e1a47222a Mon Sep 17 00:00:00 2001 From: noel guilbert Date: Thu, 28 Apr 2011 11:27:56 +0200 Subject: [PATCH] Fixed a bug when the storage service is initialized later by another bundle. In this case, we can't add the storage class to the compiled class as the service does not exists. --- .../DependencyInjection/FrameworkExtension.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index a95bf273aa..af080b562c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -299,9 +299,14 @@ class FrameworkExtension extends Extension $this->addClassesToCompile(array( 'Symfony\\Component\\HttpFoundation\\SessionStorage\\SessionStorageInterface', - $container->findDefinition('session.storage')->getClass(), $container->getDefinition('session')->getClass(), )); + + if ($container->hasDefinition($config['storage_id'])) { + $this->addClassesToCompile(array( + $container->findDefinition('session.storage')->getClass(), + )); + } } /**