Tentative de régler le bordel

This commit is contained in:
Gauvain Boiché
2020-03-31 15:58:31 +02:00
parent a1864c0414
commit 459b46df7b
345 changed files with 10758 additions and 4066 deletions

View File

@@ -35,7 +35,7 @@ class loader extends \Twig_Loader_Filesystem
{
$this->filesystem = $filesystem;
parent::__construct($paths, $this->filesystem->realpath(dirname(__FILE__)));
parent::__construct($paths, __DIR__);
}
/**
@@ -116,7 +116,7 @@ class loader extends \Twig_Loader_Filesystem
* Override for Twig_Loader_Filesystem::findTemplate to add support
* for loading from safe directories.
*/
protected function findTemplate($name)
protected function findTemplate($name, $throw = true)
{
$name = (string) $name;
@@ -132,12 +132,12 @@ class loader extends \Twig_Loader_Filesystem
// First, find the template name. The override above of validateName
// causes the validateName process to be skipped for this call
$file = parent::findTemplate($name);
$file = parent::findTemplate($name, $throw);
try
{
// Try validating the name (which may throw an exception)
parent::validateName($name);
$this->validateName($name);
}
catch (\Twig_Error_Loader $e)
{