Browse Source
Fixed bug #63512 parse_ini_file() with INI_SCANNER_RAW removes quotes from value
Fixed bug #63512 parse_ini_file() with INI_SCANNER_RAW removes quotes from value
Restore the old behavior but keep bug 51094 fixedPHP-5.3.20
4 changed files with 62 additions and 19 deletions
-
3NEWS
-
43Zend/zend_ini_scanner.l
-
2ext/standard/tests/file/bug51094.phpt
-
33ext/standard/tests/file/bug63512.phpt
@ -0,0 +1,33 @@ |
|||
--TEST-- |
|||
Fixed bug #63512 (parse_ini_file() with INI_SCANNER_RAW removes quotes from value). |
|||
--FILE-- |
|||
<?php |
|||
|
|||
$array = parse_ini_string(' |
|||
int = 123 |
|||
constant = INSTALL_ROOT |
|||
quotedString = "string" |
|||
a = INSTALL_ROOT "waa" |
|||
b = "INSTALL_ROOT" |
|||
c = "waa" INSTALL_ROOT |
|||
d = INSTALL_ROOT "INSTALL_ROOT"', false, INI_SCANNER_RAW); |
|||
|
|||
var_dump($array); |
|||
--EXPECTF-- |
|||
array(7) { |
|||
["int"]=> |
|||
string(3) "123" |
|||
["constant"]=> |
|||
string(12) "INSTALL_ROOT" |
|||
["quotedString"]=> |
|||
string(6) "string" |
|||
["a"]=> |
|||
string(18) "INSTALL_ROOT "waa"" |
|||
["b"]=> |
|||
string(12) "INSTALL_ROOT" |
|||
["c"]=> |
|||
string(18) ""waa" INSTALL_ROOT" |
|||
["d"]=> |
|||
string(27) "INSTALL_ROOT "INSTALL_ROOT"" |
|||
} |
|||
|
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue