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:
parent
40e61e4d1e
commit
c0fde5d5fd
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user