minor #15538 [expression-language] Code Cleanup for GetAttrNode (zerustech)
This PR was merged into the 2.7 branch.
Discussion
----------
[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
Commits
-------
166e175
[expression-language] Code Cleanup for GetAttrNode
This commit is contained in:
commit
31d76ec0f7
@ -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);
|
||||
|
Reference in New Issue
Block a user