From: Jani Taskinen Date: Tue, 4 Aug 2009 02:34:04 +0000 (+0000) Subject: - Fixed bug #49056 (parse_ini_file() regression in 5.3.0 when using non-ASCII strings... X-Git-Tag: php-5.3.1RC1~179 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ea98d7a72ebcf99094b9266968e2c56f1493f400;p=php - Fixed bug #49056 (parse_ini_file() regression in 5.3.0 when using non-ASCII strings as option keys) --- diff --git a/NEWS b/NEWS index 8c129c1dbd..ece156c4ef 100644 --- a/NEWS +++ b/NEWS @@ -23,6 +23,8 @@ PHP NEWS Zend extensions). (Stas) - Fixed bug #49064 (--enable-session=shared does not work: undefined symbol: php_url_scanner_reset_vars). (Jani) +- Fixed bug #49056 (parse_ini_file() regression in 5.3.0 when using non-ASCII + strings as option keys). (Jani) - Fixed bug #49052 (context option headers freed too early when using --with-curlwrappers). (Jani) - Fixed bug #49032 (SplFileObject::fscanf() variables passed by reference). diff --git a/Zend/zend_ini_scanner.l b/Zend/zend_ini_scanner.l index c6ff0784e7..ac1ac76ac2 100644 --- a/Zend/zend_ini_scanner.l +++ b/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*._-]* +LABEL [^=\n\r\t ;|&$~(){}!"\[]+ TOKENS [:,.\[\]"'()|^&+-/*=%$!~<>?@{}] OPERATORS [&|~()!] DOLLAR_CURLY "${" diff --git a/ext/standard/tests/general_functions/bug49056.phpt b/ext/standard/tests/general_functions/bug49056.phpt new file mode 100644 index 0000000000..208766cce0 --- /dev/null +++ b/ext/standard/tests/general_functions/bug49056.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #49056 (parse_ini_*() regression in 5.3.0 when using non-ASCII strings as option keys) +--FILE-- + +--CLEAN-- + +--EXPECT-- +array(2) { + ["Cooking_furniture"]=> + string(23) "Küchen Möbel (en)" + ["Küchen_Möbel"]=> + string(22) "Cooking furniture (en)" +}