Skip to content

[PropertyAccess] stop overwriting once a reference is reached #13826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed

[PropertyAccess] stop overwriting once a reference is reached #13826

wants to merge 5 commits into from

Conversation

bananer
Copy link
Contributor

@bananer bananer commented Mar 2, 2015

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets 13731
License MIT
Doc PR none

I added test cases for the scenario described in my issue. After looking through the PropertyAccessor source my conclusion was that there is no reason to overwrite parents of references, so I changed that. None of the previous test cases disagreed and my new tests also passed.

Or maybe I got it all wrong, I'm willing to learn.

@@ -89,10 +89,11 @@ public function setValue(&$objectOrArray, $propertyPath, $value)
} else {
$this->writeProperty($objectOrArray, $property, $value);
}

$overwrite = !$propertyValues[$i][self::IS_REF];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should break the loop when not needed anymore. currently it will loop without doing anything.

@bananer
Copy link
Contributor Author

bananer commented Mar 3, 2015

Continued as #13831

@bananer bananer closed this Mar 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants