cvs: php-src /ext/standard/tests/file bug46347.phpt ZendEngine2 zend_ini_scanner.l
| From: | Nuno Lopes | Date: | Mon, 02 Feb 2009 19:25:30 +0000 |
| Subject: | cvs: php-src /ext/standard/tests/file bug46347.phpt ZendEngine2 zend_ini_scanner.l | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-56071@lists.php.net to get a copy of this message | ||
nlopess Mon Feb 2 19:25:30 2009 UTC
Modified files:
/ZendEngine2 zend_ini_scanner.l
/php-src/ext/standard/tests/file bug46347.phpt
Log:
MFB: fix #46347
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini_scanner.l?r1=1.60&r2=1.61&diff_format=u
Index: ZendEngine2/zend_ini_scanner.l
diff -u ZendEngine2/zend_ini_scanner.l:1.60 ZendEngine2/zend_ini_scanner.l:1.61
--- ZendEngine2/zend_ini_scanner.l:1.60 Fri Jan 2 20:36:30 2009
+++ ZendEngine2/zend_ini_scanner.l Mon Feb 2 19:25:30 2009
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ini_scanner.l,v 1.60 2009/01/02 20:36:30 felipe Exp $ */
+/* $Id: zend_ini_scanner.l,v 1.61 2009/02/02 19:25:30 nlopess Exp $ */
#include <errno.h>
#include "zend.h"
@@ -309,7 +309,7 @@
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 "${"
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/bug46347.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/file/bug46347.phpt
diff -u /dev/null php-src/ext/standard/tests/file/bug46347.phpt:1.2
--- /dev/null Mon Feb 2 19:25:30 2009
+++ php-src/ext/standard/tests/file/bug46347.phpt Mon Feb 2 19:25:30 2009
@@ -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"
+}