diff --git a/lib/Twig/Parser.php b/lib/Twig/Parser.php index 9ababd0ad..de8a391e1 100644 --- a/lib/Twig/Parser.php +++ b/lib/Twig/Parser.php @@ -69,6 +69,7 @@ class Twig_Parser implements Twig_ParserInterface { // push all variables into the stack to keep the current state of the parser // using get_object_vars() instead of foreach would lead to https://bugs.php.net/71336 + // This hack can be removed when min version if PHP 7.0 $vars = array(); foreach ($this as $k => $v) { $vars[$k] = $v;