-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug #77589 (Core dump using parse_ini_string with numeric secti…
…ons) Section name should not be typed(NULL, FALSE, TRUE etc)
- Loading branch information
Showing
4 changed files
with
176 additions
and
130 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--TEST-- | ||
BUG #77589 (Core dump using parse_ini_string with numeric sections) | ||
--FILE-- | ||
<?php | ||
var_dump( | ||
parse_ini_string(<<<INI | ||
[0] | ||
a = 1 | ||
b = on | ||
c = true | ||
["true"] | ||
a = 100 | ||
b = null | ||
c = yes | ||
INI | ||
, TRUE, INI_SCANNER_TYPED)); | ||
|
||
?> | ||
--EXPECT-- | ||
array(2) { | ||
[0]=> | ||
array(3) { | ||
["a"]=> | ||
int(1) | ||
["b"]=> | ||
bool(true) | ||
["c"]=> | ||
bool(true) | ||
} | ||
["true"]=> | ||
array(3) { | ||
["a"]=> | ||
int(100) | ||
["b"]=> | ||
NULL | ||
["c"]=> | ||
bool(true) | ||
} | ||
} |
Oops, something went wrong.