Commit 0859d0f4 by Alexander Makarov

Fixes #5308: object function calls in templates were passing arguments in a wrong way

parent 7592dcc7
......@@ -4,7 +4,7 @@ Yii Framework 2 twig extension Change Log
2.0.0 under development
-----------------------
- no changes in this release.
- Bug #5308: object function calls in templates were passing arguments in a wrong way (genichyar, samdark)
2.0.0-rc September 27, 2014
......
......@@ -25,7 +25,7 @@ abstract class Template extends \Twig_Template
if ($this->env->hasExtension('sandbox')) {
$this->env->getExtension('sandbox')->checkMethodAllowed($object, $item);
}
return $object->$item($arguments);
return call_user_func_array([$object, $item], $arguments);
} else {
if ($this->env->hasExtension('sandbox')) {
$this->env->getExtension('sandbox')->checkPropertyAllowed($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