#50564 [NEW]: Warning: Unexpected character in input: '\' (ASCII=92) state=1 in ...
| From: | wyattstorch42 at gmail dot com | Date: | Wed, 23 Dec 2009 18:32:23 +0000 |
| Subject: | #50564 [NEW]: Warning: Unexpected character in input: '\' (ASCII=92) state=1 in ... | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-146074@lists.php.net to get a copy of this message | ||
From: wyattstorch42 at gmail dot com
Operating system: Linux
PHP version: 5.2.12
PHP Bug Type: Strings related
Bug description: Warning: Unexpected character in input: '\' (ASCII=92) state=1 in ...
Description:
------------
Hello,
I have slaved over this one line of code and confirmed that there is
absolutely nothing wrong with it. I have even modified it and received the
same error. The error even persists when the line is commented out.
I receive a parse error as well as a warning for the backslash.
Reproduce code:
---------------
<?php
$contents = "<?php\r\n \$galleryDesc =
\"".addslashes($galleryDesc)."\";\r\n";
?>
Expected result:
----------------
I expected the value of $contents to be:
<?php
$galleryDesc = "...";
Actual result:
--------------
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in ... on
line ...
Parse error: syntax error, unexpected T_STRING in ... on line ...
--
Edit bug report at http://bugs.php.net/?id=50564&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50564&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50564&r=trysnapshot53
Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50564&r=trysnapshot60
Fixed in SVN: http://bugs.php.net/fix.php?id=50564&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50564&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=50564&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=50564&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=50564&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=50564&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=50564&r=support
Expected behavior: http://bugs.php.net/fix.php?id=50564&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=50564&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=50564&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=50564&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50564&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=50564&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=50564&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=50564&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=50564&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=50564&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=50564&r=mysqlcfg