Skip to content

Commit

Permalink
Fixed bug #77589 (Core dump using parse_ini_string with numeric secti…
Browse files Browse the repository at this point in the history
…ons)

Section name should not be typed(NULL, FALSE, TRUE etc)
  • Loading branch information
laruence committed Feb 11, 2019
1 parent 1f86dcd commit 92055ca
Show file tree
Hide file tree
Showing 4 changed files with 176 additions and 130 deletions.
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2019, PHP 7.2.16

- Core:
. Fixed bug #77589 (Core dump using parse_ini_string with numeric sections).
(Laruence)

- PDO_OCI:
. Support Oracle Database tracing attributes ACTION, MODULE,
CLIENT_INFO, and CLIENT_IDENTIFIER. (Cameron Porter)
Expand Down
40 changes: 40 additions & 0 deletions Zend/tests/bug77589.phpt
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)
}
}

0 comments on commit 92055ca

Please sign in to comment.