This repository has been archived by the owner on Jan 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fixed boolean/integer BC break in Zend\Config\Writer\PhpArray #5569
Merged
weierophinney
merged 1 commit into
zendframework:develop
from
michaelmoussa:readable-config-arrays
Dec 6, 2013
Merged
Fixed boolean/integer BC break in Zend\Config\Writer\PhpArray #5569
weierophinney
merged 1 commit into
zendframework:develop
from
michaelmoussa:readable-config-arrays
Dec 6, 2013
Conversation
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
Booleans and integers were being inadvertently converted to strings when saved in the config array. This preserves the datatype.
weierophinney
added a commit
that referenced
this pull request
Dec 6, 2013
Fixed boolean/integer BC break in Zend\Config\Writer\PhpArray
weierophinney
added a commit
that referenced
this pull request
Dec 6, 2013
ghost
assigned weierophinney
Dec 6, 2013
$arrayString .= "'" . addslashes($value) . "',\n"; | ||
} else { | ||
$arrayString .= $value . ",\n"; |
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.
This case creates a new issue; null
values now result in invalid configuration like this:
'some_key' => ,
I'm going to apply a patch shortly that fixes that situation.
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.
Ah, sorry I missed that. Thanks for catching it!
weierophinney
added a commit
that referenced
this pull request
Dec 7, 2013
- Previous fix led to: ```php 'null' => , ``` - Fix properly echoes the null value: ```php 'null' => null, ```
weierophinney
added a commit
to zendframework/zend-config
that referenced
this pull request
May 15, 2015
…a/readable-config-arrays Fixed boolean/integer BC break in Zend\Config\Writer\PhpArray
weierophinney
added a commit
to zendframework/zend-config
that referenced
this pull request
May 15, 2015
- elseif -> else if
weierophinney
added a commit
to zendframework/zend-config
that referenced
this pull request
May 15, 2015
weierophinney
added a commit
to zendframework/zend-config
that referenced
this pull request
May 15, 2015
- Previous fix led to: ```php 'null' => , ``` - Fix properly echoes the null value: ```php 'null' => null, ```
weierophinney
added a commit
to zendframework/zend-config
that referenced
this pull request
May 15, 2015
Additional fix for zendframework/zendframework#5569
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I realized I accidentally broke BC with the readable format config array PR. This is a simple fix that will preserve the config value's datatype when it isn't a string.
See PR 5259