[expression-language] Code Cleanup for GetAttrNode

Use ``$this->nodes['attribute']->attributes['value']`` to
replace ``$this->nodes['attribute']->evaluate($functions, $values)``
for method call and property call.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a
This commit is contained in:
Michael Lee 2015-08-13 19:30:11 +08:00
parent f1d588512f
commit 166e1750bc

View File

@ -78,7 +78,7 @@ class GetAttrNode extends Node
throw new \RuntimeException('Unable to get a property on a non-object.');
}
return call_user_func_array(array($obj, $this->nodes['attribute']->evaluate($functions, $values)), $this->nodes['arguments']->evaluate($functions, $values));
return call_user_func_array(array($obj, $this->nodes['attribute']->attributes['value']), $this->nodes['arguments']->evaluate($functions, $values));
case self::ARRAY_CALL:
$array = $this->nodes['node']->evaluate($functions, $values);