Browse files

[Form] improve error message with a "hasser" hint for PropertyAccessD…

…eniedException

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
  • Loading branch information...
1 parent e345bf2 commit be0f7536225a4faf62e6fda4cc6523a729e511d1 @bicpi bicpi committed Nov 24, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Util/PropertyPath.php
View
2 Util/PropertyPath.php
@@ -425,7 +425,7 @@ private function &readProperty(&$objectOrArray, $property, $isIndex)
$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;

0 comments on commit be0f753

Please sign in to comment.