Pass false as cache to Twig

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2017-05-05 13:28:20 +02:00
parent e852abc344
commit 272baec2cc

View File

@ -59,9 +59,14 @@ class Template
$this->helperFunctions = $helperFunctions;
$loader = new Twig_Loader_Filesystem(static::BASE_PATH);
$cache_dir = $GLOBALS['PMA_Config']->getTempDir('twig');
/* Twig expects false when cache is not configured */
if (is_null($cache_dir)) {
$cache_dir = false;
}
$this->twig = new Twig_Environment($loader, array(
'auto_reload' => true,
'cache' => $GLOBALS['PMA_Config']->getTempDir('twig'),
'cache' => ,
'debug' => false,
));
$this->twig->addExtension(new I18nExtension());