Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using Set::merge() on an empty array causes issues with out of order numeric keys. Only merge if necessary. Fixes #2595
- Loading branch information
Showing
2 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89df484
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
git bisect shows this commit as introduding duplicate values when posting habtm data with input('Tag') on a Post form.
request->data['Tag']['Tag'] should be array(1, 2), but now shows array(1, 2, 1, 2) when selecting first 2 tags
89df484
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ceeram/cakephp@2.1...2.1-requestdata
results: http://bin.cakephp.org/view/1818149545
created a testcase for this, not sure how to solve it yet, need to look into that
89df484
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
included a fix now as well
89df484
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm an idiot, I don't know how I missed that the first time around. I merged in your changes :D
89df484
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@markstory Your original commit was on 2.0 so perhaps the fix done by Ceeram for 2.1 should be backported to 2.0 too.
89df484
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It certainly should. I cherry-picked the changes in [836f913] and [6d3c659]
89df484
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented in wrong place already i think
@markstory The branch had 4 commits in total for the tests and fix, i messed up with making tests
you only cherry-picked two of the commits in 2.0, causing a fail
89df484
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I guess I'll find the other commits and merge those too.