Skip to content

Commit 4f044f6

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Fixed bug #77589 (Core dump using parse_ini_string with numeric sections) Conflicts: Zend/zend_ini_scanner.c
2 parents bdce295 + 92055ca commit 4f044f6

File tree

5 files changed

+1970
-1877
lines changed

5 files changed

+1970
-1877
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ PHP NEWS
33
?? ??? ????, PHP 7.3.3
44

55
- Core:
6+
. Fixed bug #77589 (Core dump using parse_ini_string with numeric sections).
7+
(Laruence)
68
. Fixed bug #77329 (Buffer Overflow via overly long Error Messages).
79
(Dmitry)
810
. Fixed bug #77494 (Disabling class causes segfault on member access).

Zend/tests/bug77589.phpt

Lines changed: 40 additions & 0 deletions
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)