From dc28748c53f0af82af663132c84eb2a94da6a186 Mon Sep 17 00:00:00 2001
From: Dries <dries@buytaert.net>
Date: Fri, 24 May 2013 13:58:57 -0700
Subject: [PATCH] Issue #2003578 by Jon Pugh, joelpittet: Fixed twig_cache()
 must be FALSE in install.php registerTwig because we don't know if files
 folder is writable yet.

---
 core/lib/Drupal/Core/CoreBundle.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/core/lib/Drupal/Core/CoreBundle.php b/core/lib/Drupal/Core/CoreBundle.php
index 2d85f6a4830b..01fb02914db2 100644
--- a/core/lib/Drupal/Core/CoreBundle.php
+++ b/core/lib/Drupal/Core/CoreBundle.php
@@ -99,7 +99,9 @@ public static function registerTwig(ContainerBuilder $container) {
         // This is saved / loaded via drupal_php_storage().
         // All files can be refreshed by clearing caches.
         // @todo ensure garbage collection of expired files.
-        'cache' => settings()->get('twig_cache', TRUE),
+        // When in the installer, twig_cache must be FALSE until we know the
+        // files folder is writable.
+        'cache' => ((MAINTENANCE_MODE != 'install') ? settings()->get('twig_cache', TRUE) : FALSE),
         'base_template_class' => 'Drupal\Core\Template\TwigTemplate',
         // @todo Remove in followup issue
         // @see http://drupal.org/node/1712444.
-- 
GitLab