Browse Source

fix bug #46347: allow * in ini keys

experimental/5.3-FPM
Nuno Lopes 18 years ago
parent
commit
7f6ff02f5c
  1. 1
      NEWS
  2. 2
      Zend/zend_ini_scanner.l
  3. 24
      ext/standard/tests/file/bug46347.phpt

1
NEWS

@ -2,6 +2,7 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2009, PHP 5.3.0 Beta 2
- Fixed bug #47229 (preg_quote() should escape the '-' char). (Nuno)
- Fixed bug #46347 (parse_ini_file() doesn't support * in keys). (Nuno)
29 Jan 2009, PHP 5.3.0 Beta 1

2
Zend/zend_ini_scanner.l

@ -308,7 +308,7 @@ NEWLINE ("\r"|"\n"|"\r\n")
TABS_AND_SPACES [ \t]
WHITESPACE [ \t]+
CONSTANT [a-zA-Z][a-zA-Z0-9_]*
LABEL [a-zA-Z0-9_][a-zA-Z0-9._-]*
LABEL [a-zA-Z0-9_][a-zA-Z0-9*._-]*
TOKENS [:,.\[\]"'()|^&+-/*=%$!~<>?@{}]
OPERATORS [&|~()!]
DOLLAR_CURLY "${"

24
ext/standard/tests/file/bug46347.phpt

@ -0,0 +1,24 @@
--TEST--
Bug #46347 (parse_ini_file() doesn't support * in keys)
--FILE--
<?php
$str = <<< EOF
[section]
part1.*.part2 = 1
EOF;
$file = __DIR__ . '/parse.ini';
file_put_contents($file, $str);
var_dump(parse_ini_file($file));
?>
--CLEAN--
<?php
unlink(__DIR__.'/parse.ini');
?>
--EXPECT--
array(1) {
["part1.*.part2"]=>
string(1) "1"
}
Loading…
Cancel
Save