Skip to content

Commit a9cb63d

Browse files
xabbuhjaviereguiluz
authored andcommitted
[PropertyAccess] do not pass boolean constructor flags
1 parent 567ccbc commit a9cb63d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/property_access.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ Sometimes, adder and remover methods don't use the standard ``add`` or ``remove`
435435

436436
$list = new PeopleList();
437437
$reflectionExtractor = new ReflectionExtractor(null, null, ['join', 'leave']);
438-
$propertyAccessor = new PropertyAccessor(PropertyAccessor::DISALLOW_MAGIC_METHODS, false, null, true, $reflectionExtractor, $reflectionExtractor);
438+
$propertyAccessor = new PropertyAccessor(PropertyAccessor::DISALLOW_MAGIC_METHODS, PropertyAccessor::THROW_ON_INVALID_PROPERTY_PATH, null, $reflectionExtractor, $reflectionExtractor);
439439
$propertyAccessor->setValue($person, 'peoples', ['kevin', 'wouter']);
440440

441441
var_dump($person->getPeoples()); // ['kevin', 'wouter']

0 commit comments

Comments
 (0)