This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/tests
Jeremy Mikola df9ef79953 [Form] readPropertyPath should return null instead of empty array
When reading the last bit of a property path mapped to a missing array index, the method would initialize the value to an empty array.  This makes sense for cases where readPropertyPath would again be called recursively, but not when the value would be immediately returned (null would be preferable in that case).

For example, we have an object with a property called "options" that's an array of arbitrary key/value pairs.  That "options" property (and getOptions()) maps directly to a FieldGroup within the Form for this object.  That FieldGroup contains multiple TextFields for a few expected keys in the array.  As-is, if those keys were not defined, the default data set for those TextFields could end up being "Array" (string representation of an empty array).  If readPropertyPath instead returns null for this case, the default data would be transformed into an empty string.
2010-10-13 08:17:05 +02:00
..
Symfony/Tests/Component [Form] readPropertyPath should return null instead of empty array 2010-10-13 08:17:05 +02:00
bootstrap.php simplified bootstrap.php 2010-06-30 10:29:27 +02:00