Skip to content
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

EZP-29085: Force to use integer keys in eZXMLOutputHandler->NodeArray #1356

Merged
merged 1 commit into from
Jun 28, 2018
Merged

EZP-29085: Force to use integer keys in eZXMLOutputHandler->NodeArray #1356

merged 1 commit into from
Jun 28, 2018

Conversation

SerheyDolgushev
Copy link
Contributor

@SerheyDolgushev SerheyDolgushev commented Mar 27, 2018

Fix https://jira.ez.no/browse/EZP-29085
Sent to QA

Copied from Slack:
Seems like nodeID is forced to convert to string at https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/classes/datatypes/ezxmltext/ezxmloutputhandler.php#L278 and https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/classes/datatypes/ezxmltext/ezxmloutputhandler.php#L285

But http://php.net/manual/en/language.types.array.php says:
Additionally the following key casts will occur:
Strings containing valid decimal integers, unless the number is preceded by a + sign, will be cast to the integer type. E.g. the key “8” will actually be stored under 8. On the other hand “08" will not be cast, as it isn’t a valid decimal integer.

I.e. the string conversion is pointless, the array index will be an integer anyway.

@SerheyDolgushev
Copy link
Contributor Author

SerheyDolgushev commented Mar 27, 2018

More details are discussed on Slack with Gunnstein Lye

@glye glye requested a review from adamwojs April 3, 2018 08:27
@glye
Copy link
Member

glye commented Apr 3, 2018

@l0rdJ Could you please make the commit text more descriptive? And if the two fixes are for separate issues, can you put them in separate commits, please?

@SerheyDolgushev SerheyDolgushev changed the title eZXMLOutputHandler minor fixes Force to use integer keys in eZXMLOutputHandler->NodeArray Apr 10, 2018
@SerheyDolgushev SerheyDolgushev changed the title Force to use integer keys in eZXMLOutputHandler->NodeArray Force to use integer keys in eZXMLOutputHandler->NodeArray Apr 10, 2018
@SerheyDolgushev
Copy link
Contributor Author

@glye i changed PR title and commit message. That two fixes are not separate, so they should be in the same commit.

@glye glye changed the title Force to use integer keys in eZXMLOutputHandler->NodeArray EZP-29085: Force to use integer keys in eZXMLOutputHandler->NodeArray Apr 11, 2018
@glye
Copy link
Member

glye commented Apr 11, 2018

Sent to QA.

@andrerom andrerom merged commit 4fcd80c into ezsystems:master Jun 28, 2018
andrerom pushed a commit that referenced this pull request Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants