Skip to content

Commit 92055ca

Browse files
committed
Fixed bug #77589 (Core dump using parse_ini_string with numeric sections)
Section name should not be typed(NULL, FALSE, TRUE etc)
1 parent 1f86dcd commit 92055ca

File tree

4 files changed

+176
-130
lines changed

4 files changed

+176
-130
lines changed

NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2019, PHP 7.2.16
44

5+
- Core:
6+
. Fixed bug #77589 (Core dump using parse_ini_string with numeric sections).
7+
(Laruence)
8+
59
- PDO_OCI:
610
. Support Oracle Database tracing attributes ACTION, MODULE,
711
CLIENT_INFO, and CLIENT_IDENTIFIER. (Cameron Porter)

Zend/tests/bug77589.phpt

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
--TEST--
2+
BUG #77589 (Core dump using parse_ini_string with numeric sections)
3+
--FILE--
4+
<?php
5+
var_dump(
6+
parse_ini_string(<<<INI
7+
[0]
8+
a = 1
9+
b = on
10+
c = true
11+
12+
["true"]
13+
a = 100
14+
b = null
15+
c = yes
16+
INI
17+
, TRUE, INI_SCANNER_TYPED));
18+
19+
?>
20+
--EXPECT--
21+
array(2) {
22+
[0]=>
23+
array(3) {
24+
["a"]=>
25+
int(1)
26+
["b"]=>
27+
bool(true)
28+
["c"]=>
29+
bool(true)
30+
}
31+
["true"]=>
32+
array(3) {
33+
["a"]=>
34+
int(100)
35+
["b"]=>
36+
NULL
37+
["c"]=>
38+
bool(true)
39+
}
40+
}

0 commit comments

Comments
 (0)