소스 검색

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.

noel guilbert 14 년 전
부모
커밋
6f1df3338d
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

+ 6 - 1
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(),
+            ));
+        }
     }
 
     /**