php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49056 parse_ini_file() regression in 5.3.0 when using non-ASCII strings as option keys
Submitted: 2009-07-25 13:41 UTC Modified: 2010-12-20 12:47 UTC
From: weierophinney@php.net Assigned: jani
Status: Closed Package: PHP options/info functions
PHP Version: 5.3.0 OS: Ubuntu 9.04
Private report: No CVE-ID:
 [2009-07-25 13:41 UTC] weierophinney@php.net
Description:
------------
In PHP versions < 5.3.0, one could specify INI option keys using non-ASCII characters; parse_ini_file would find these without issue.

Starting with 5.3.0, such options are silently dropped from the returned array of key/value pairs. The same is true of parse_ini_string().

I have the following extensions enabled:
bz2 Core ctype curl date dom ereg fileinfo filter gd gettext hash iconv intl json libxml mhash mysql openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix Reflection session SimpleXML soap sockets SPL SQLite sqlite3 standard tidy tokenizer xml xmlreader xmlwriter zip zlib

My php.ini is php.ini-development, with the only changes being to set my include_path and date.timezone.

Reproduce code:
---------------
$string =<<<EOT
Cooking_furniture="Küchen Möbel (en)"
Küchen_Möbel="Cooking furniture (en)"
EOT;

$data = parse_ini_string($string);
var_export($data);

Expected result:
----------------
array (
  'Cooking_furniture' => 'Küchen Möbel (en)',
  'Küchen_Möbel' => 'Cooking furniture (en)',
)

Actual result:
--------------
array (
  'Cooking_furniture' => 'Küchen Möbel (en)',
)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-08-04 02:34 UTC] svn@php.net
Automatic comment from SVN on behalf of jani
Revision: http://svn.php.net/viewvc/?view=revision&revision=286778
Log: - Fixed bug #49056 (parse_ini_file() regression in 5.3.0 when using non-ASCII strings as option keys)
 [2009-08-04 02:35 UTC] jani@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2010-12-20 12:47 UTC] jani@php.net
-Package: Tidy +Package: PHP options/info functions -Assigned To: +Assigned To: jani
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 16 16:02:23 2014 UTC