[ExpressionLanguage] Fixed exception message
This commit is contained in:
parent
421c7f8fcd
commit
4d695b380d
@ -80,7 +80,7 @@ class GetAttrNode extends Node
|
|||||||
case self::METHOD_CALL:
|
case self::METHOD_CALL:
|
||||||
$obj = $this->nodes['node']->evaluate($functions, $values);
|
$obj = $this->nodes['node']->evaluate($functions, $values);
|
||||||
if (!\is_object($obj)) {
|
if (!\is_object($obj)) {
|
||||||
throw new \RuntimeException('Unable to get a property on a non-object.');
|
throw new \RuntimeException('Unable to call method of a non-object.');
|
||||||
}
|
}
|
||||||
if (!\is_callable($toCall = [$obj, $this->nodes['attribute']->attributes['value']])) {
|
if (!\is_callable($toCall = [$obj, $this->nodes['attribute']->attributes['value']])) {
|
||||||
throw new \RuntimeException(sprintf('Unable to call method "%s" of object "%s".', $this->nodes['attribute']->attributes['value'], \get_class($obj)));
|
throw new \RuntimeException(sprintf('Unable to call method "%s" of object "%s".', $this->nodes['attribute']->attributes['value'], \get_class($obj)));
|
||||||
|
Reference in New Issue
Block a user