Commit 895bdbcd by Alexander Makarov

Fixes #4637: fixed broken Twig method calls

parent 464292d1
...@@ -22,7 +22,7 @@ abstract class Template extends \Twig_Template ...@@ -22,7 +22,7 @@ abstract class Template extends \Twig_Template
// Twig uses isset() to check if attribute exists which does not work when attribute exists but is null // Twig uses isset() to check if attribute exists which does not work when attribute exists but is null
if ($object instanceof \yii\db\BaseActiveRecord) { if ($object instanceof \yii\db\BaseActiveRecord) {
if ($type === \Twig_Template::METHOD_CALL) { if ($type === \Twig_Template::METHOD_CALL) {
return $object->$item(); return $object->$item($arguments);
} else { } else {
return $object->$item; return $object->$item;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment