Skip to content

Commit b8efb9e

Browse files
committedAug 19, 2011
added twig 1.2 compat (closes kriswallsmith#102, refs kriswallsmith#98)
1 parent 3e45781 commit b8efb9e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/Assetic/Extension/Twig/TwigFormulaLoader.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ private function loadNode(\Twig_Node $node)
6161
),
6262
);
6363
} elseif ($node instanceof \Twig_Node_Expression_Function) {
64-
$name = $node->getNode('name')->getAttribute('name');
64+
$name = version_compare(\Twig_Environment::VERSION, '1.2.0-DEV', '<')
65+
? $node->getNode('name')->getAttribute('name')
66+
: $node->getAttribute('name');
67+
6568
if ($this->twig->getFunction($name) instanceof AsseticFilterFunction) {
6669
$arguments = array();
6770
foreach ($node->getNode('arguments') as $argument) {

0 commit comments

Comments
 (0)
Please sign in to comment.