mirror of
https://github.com/php/php-src.git
synced 2024-12-13 20:05:26 +08:00
6295ff77b7
Cherry-picked the fix(not sure why this wasn't merged to 7.4) for: Fixed bug #77589 (Core dump using parse_ini_string with numeric sections) Section name should not be typed(NULL, FALSE, TRUE etc) Conflicts: Zend/zend_ini_scanner.c
41 lines
455 B
PHP
41 lines
455 B
PHP
--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)
|
|
}
|
|
}
|