|
@@ -23,6 +23,7 @@ use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddClassesToCach
|
|
|
use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\TranslatorPass;
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
|
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
|
|
|
+use Symfony\Component\HttpFoundation\File\File;
|
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
|
|
|
|
|
/**
|
|
@@ -43,6 +44,10 @@ class FrameworkBundle extends Bundle
|
|
|
$container->get('error_handler');
|
|
|
}
|
|
|
|
|
|
+ if ($this->container->hasParameter('document_root')) {
|
|
|
+ File::setDocumentRoot($this->container->getParameter('document_root'));
|
|
|
+ }
|
|
|
+
|
|
|
// the session ID should always be included in the CSRF token, even
|
|
|
// if default CSRF protection is not enabled
|
|
|
if ($container->has('form.default_context') && $container->has('session')) {
|