ID:               44609
 Updated by:       [EMAIL PROTECTED]
 Reported By:      sander at procurios dot nl
 Status:           Assigned
 Bug Type:         Filesystem function related
 Operating System: Mac OS X
 PHP Version:      5.3CVS-2008-04-02 (snap)
 Assigned To:      helly
 New Comment:

I did the ini changes and the syntax is the same as before apart from
adding null to the disallowed characters.

LITERAL_DOLLAR ("$"([^a-zA-Z0-9{\000]|("\\"{ANY_CHAR})))

So $4 is what is invalid in the test.


Previous Comments:
------------------------------------------------------------------------

[2008-04-03 11:14:43] [EMAIL PROTECTED]

Marcus, another "works before re2c" bug.

------------------------------------------------------------------------

[2008-04-02 12:32:51] sander at procurios dot nl

Description:
------------
Parse_ini_file gives a syntax error on 'dollar'-sign in INI-file.

Source: php5.3-200804021030.tar.gz (Built on: Apr 02, 2008 10:30 UTC)

Reproduce code:
---------------
<?php
// Set ini file location
$iniFileLocation = dirname(__FILE__) . '/test.ini';

// Build ini data
$iniData = '[database]
db_user = username
db_pass = "[EMAIL PROTECTED]"
db_name = database
db_host = localhost';

// Save ini data to file
file_put_contents($iniFileLocation, $iniData);

print_r(parse_ini_file($iniFileLocation));

Expected result:
----------------
Array
(
    [db_user] => username
    [db_pass] => [EMAIL PROTECTED]
    [db_name] => database
    [db_host] => localhost
)

Actual result:
--------------
Warning: syntax error, unexpected $end, expecting TC_DOLLAR_CURLY or
TC_QUOTED_STRING or '"' in /data/www/test.ini on line 3 in
/data/www/test.php on line 15
Array
(
    [db_user] => username
)


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44609&edit=1

Reply via email to