From 06ee53b73e1906e8fb7417f67dc8e81b282ad61e Mon Sep 17 00:00:00 2001 From: Philipp Rieber Date: Sat, 24 Nov 2012 15:41:49 +0100 Subject: [PATCH] [Form] improve error message with a "hasser" hint for PropertyAccessDeniedException Bug fix: no Feature addition: no Backwards compatibility break: no Symfony2 tests pass: no, but fails exactly the same as without this fix Fixes the following tickets: - Todo: - License of the code: MIT Documentation PR: symfony/symfony-docs#1958 --- src/Symfony/Component/Form/Util/PropertyPath.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Form/Util/PropertyPath.php b/src/Symfony/Component/Form/Util/PropertyPath.php index 7700a52630..a5cf13befe 100644 --- a/src/Symfony/Component/Form/Util/PropertyPath.php +++ b/src/Symfony/Component/Form/Util/PropertyPath.php @@ -425,7 +425,7 @@ class PropertyPath implements \IteratorAggregate, PropertyPathInterface $result[self::VALUE] = $objectOrArray->$property; } elseif ($reflClass->hasProperty($property)) { if (!$reflClass->getProperty($property)->isPublic()) { - throw new PropertyAccessDeniedException(sprintf('Property "%s" is not public in class "%s". Maybe you should create the method "%s()" or "%s()"?', $property, $reflClass->name, $getter, $isser)); + throw new PropertyAccessDeniedException(sprintf('Property "%s" is not public in class "%s". Maybe you should create the method "%s()" or "%s()" or "%s()"?', $property, $reflClass->name, $getter, $isser, $hasser)); } $result[self::VALUE] =& $objectOrArray->$property;