From: s dot coletta at unidata dot it Operating system: Windows/Ubuntu PHP version: 5.2.10 PHP Bug Type: Scripting Engine problem Bug description: eval() parser error/warning on \'
Description:
------------
Eval() makes a wrong parsing of a string ending with \\' or \'
The "Reproduce code" will not fail if you remove the ending \\ or \ like:
$str = "define('A','C:\\Dir');"; or
$str = "define('A','C:\Dir');";
Reproduce code:
---------------
$str = "define('A','C:\\Dir\\');";
eval($str);
or
$str = "define('A','C:\Dir\');";
eval($str);
Expected result:
----------------
No warnings or errors.
Just this statement executed:
define('A','C:\Dir\');
Actual result:
--------------
For both examples provided the result is the same:
Warning: Unexpected character in input: ''' (ASCII=39) state=1 in
/test.php(3) : eval()'d code on line 1
Parse error: syntax error, unexpected ':' in /test.php(3) : eval()'d code
on line 1
--
Edit bug report at http://bugs.php.net/?id=48830&edit=1
--
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=48830&r=trysnapshot52
Try a CVS snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=48830&r=trysnapshot53
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=48830&r=trysnapshot60
Fixed in CVS:
http://bugs.php.net/fix.php?id=48830&r=fixedcvs
Fixed in CVS and need be documented:
http://bugs.php.net/fix.php?id=48830&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=48830&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=48830&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=48830&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=48830&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=48830&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=48830&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=48830&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=48830&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=48830&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48830&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=48830&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=48830&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=48830&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=48830&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=48830&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=48830&r=mysqlcfg
