10000 Unescape paramaters by stof · Pull Request #3260 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Unescape paramaters #3260

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

Merged
merged 4 commits into from
Feb 4, 2012
Merged

Unescape paramaters #3260

merged 4 commits into from
Feb 4, 2012

Conversation

stof
Copy link
Member
@stof stof commented Feb 2, 2012

This fixes the unescaping of % in parameters when it is used in an array.

It is a replacement for @lsmith77's work done in #3241 but with a working fix this time :)

}

if (is_array($value)) {
$result = array();
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need a local variable here ? (What a pleasure to comment @stof code !)

Copy link
Member Author

Choose a reason for hiding this comment

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

not sure. I wrote it the way it is done in resolve() but resolve requires it because of the resolveValue call

Copy link
Member Author

Choose a reason for hiding this comment

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

btw, this made me think about a possible issue with the unescaping. I will try to confirm it with a testcase so wait a bit before merging

Copy link
Member Author

Choose a reason for hiding this comment

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

ok, the case I thought about does not break things. I tried too invent edge cases that don't exist.

fabpot added a commit that referenced this pull request Feb 4, 2012
Commits
-------

a7b48c0 Renamed the method
8e13095 Fixed the unescaping of parameters to handle arrays
045f936 Changed the testcase to expect the unescaping only after the resolution
a1b6d4c Added a failing testcase for escaped % in array parameters

Discussion
----------

Unescape paramaters

This fixes the unescaping of % in parameters when it is used in an array.

It is a replacement for @lsmith77's work done in #3241 but with a working fix this time :)
@fabpot fabpot merged commit a7b48c0 into symfony:2.0 Feb 4, 2012
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.

5 participants
0