1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-29 19:20:23 +02:00

Merge branch '3.2.x'

* 3.2.x:
  [ticket/14716] Update dependencies to latest versions
This commit is contained in:
Tristan Darricau
2016-11-14 21:36:34 +01:00
2 changed files with 100 additions and 94 deletions

View File

@@ -22,6 +22,11 @@ class lexer extends \Twig_Lexer
public function tokenize($code, $filename = null)
{
if ($code instanceof \Twig_Source)
{
$filename = $code->getName();
$code = $code->getCode();
}
// Our phpBB tags
// Commented out tokens are handled separately from the main replace
$phpbb_tags = array(
@@ -125,7 +130,7 @@ class lexer extends \Twig_Lexer
// Appends any filters
$code = preg_replace('#{([a-zA-Z0-9_\.]+)(\|[^}]+?)?}#', '{{ $1$2 }}', $code);
return parent::tokenize($code, $filename);
return parent::tokenize(new \Twig_Source($code, $filename));
}
/**