1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-24 09:30:34 +01:00

[ticket/15508] Update loader

PHPBB3-15508
This commit is contained in:
François-Xavier de Guillebon 2018-01-16 13:00:50 +01:00 committed by Marc Alexander
parent 40e61e4d1e
commit c0fde5d5fd
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995

View File

@ -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)
{