Throw less misleading exception when property access not found
This commit is contained in:
parent
73099f3555
commit
ec28da42ae
@ -608,6 +608,8 @@ class PropertyAccessor implements PropertyAccessorInterface
|
||||
// fatal error.
|
||||
|
||||
$object->$property = $value;
|
||||
} elseif (self::ACCESS_TYPE_NOT_FOUND === $access[self::ACCESS_TYPE]) {
|
||||
throw new NoSuchPropertyException(sprintf('Could not determine access type for property "%s".', $property));
|
||||
} elseif (self::ACCESS_TYPE_MAGIC === $access[self::ACCESS_TYPE]) {
|
||||
$object->{$access[self::ACCESS_NAME]}($value);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user