mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-01 21:17:21 +00:00
bug #2406 Fix tokenize call in DeprecationCollector (vdechenaux)
This PR was submitted for the 2.x branch but it was merged into the 1.x branch instead (closes #2406).
Discussion
----------
Fix tokenize call in DeprecationCollector
Hi,
if fixes `Argument 1 passed to Twig_Environment::tokenize() must be an instance of Twig_Source, string given`
Commits
-------
13ca97c1 Fix tokenize call in DeprecationCollector
This commit is contained in:
@@ -58,7 +58,7 @@ class Twig_Util_DeprecationCollector
|
||||
|
||||
foreach ($iterator as $name => $contents) {
|
||||
try {
|
||||
$this->twig->parse($this->twig->tokenize($contents, $name));
|
||||
$this->twig->parse($this->twig->tokenize(new Twig_Source($contents, $name)));
|
||||
} catch (Twig_Error_Syntax $e) {
|
||||
// ignore templates containing syntax errors
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user