From 4d695b380da65ace5b7734e1da8933f001d770d9 Mon Sep 17 00:00:00 2001 From: Ahmed TAILOULOUTE Date: Fri, 28 Feb 2020 11:19:56 +0100 Subject: [PATCH] [ExpressionLanguage] Fixed exception message --- src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php b/src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php index 4d10f31175..7d86b53bc2 100644 --- a/src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php +++ b/src/Symfony/Component/ExpressionLanguage/Node/GetAttrNode.php @@ -80,7 +80,7 @@ class GetAttrNode extends Node case self::METHOD_CALL: $obj = $this->nodes['node']->evaluate($functions, $values); 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']])) { throw new \RuntimeException(sprintf('Unable to call method "%s" of object "%s".', $this->nodes['attribute']->attributes['value'], \get_class($obj)));