Fix tokenize call in DeprecationCollector

This commit is contained in:
Vincent Dechenaux
2017-02-21 16:27:25 +01:00
committed by Fabien Potencier
parent b6a16a21f9
commit 13ca97c16f
+1 -1
View File
@@ -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
}