Browse Source

[FrameworkBundle] fixed session auto-start option

Fabien Potencier 14 năm trước cách đây
mục cha
commit
a8685614e0

+ 5 - 1
src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

@@ -375,7 +375,11 @@ class FrameworkExtension extends Extension
             }
         }
 
-        if (isset($config['auto_start']) || isset($config['auto-start'])) {
+        if (isset($config['auto-start'])) {
+            $config['auto_start'] = $config['auto-start'];
+        }
+
+        if (isset($config['auto_start']) && $config['auto_start']) {
             $container->getDefinition('session')->addMethodCall('start');
         }