#37262 [Csd]: var_export() does not escape \0 character
| From: | derick@php.net | Date: | Sun, 09 Dec 2007 14:31:57 +0000 |
| Subject: | #37262 [Csd]: var_export() does not escape \0 character | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-120492@lists.php.net to get a copy of this message | ||
ID: 37262
Updated by: derick@php.net
Reported By: idiom at mail dot ru
Status: Closed
Bug Type: Variables related
Operating System: Windows
PHP Version: 5.1.3, 4.4.2
New Comment:
This was fixed improperly, as the resulting output could not be parsed
back to its original string. A fix for this is in PHP 5.2.6/5.3.0/6.0.0.
Previous Comments:
------------------------------------------------------------------------
[2006-10-09 18:09:50] iliaa@php.net
This bug has been fixed in CVS.
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.
------------------------------------------------------------------------
[2006-07-22 12:33:13] sniper@php.net
Derick, still looking?
------------------------------------------------------------------------
[2006-05-01 16:10:31] derick@php.net
I'll have a look
------------------------------------------------------------------------
[2006-05-01 15:15:41] idiom at mail dot ru
Description:
------------
var_export() outputs \0 in variables as is, messing browser
Reproduce code:
---------------
$func = create_function('$a', 'return $a;');
var_export($func);
Expected result:
----------------
identical to:
$func = create_function('$a', 'return $a;');
$output = addcslashes(var_export($func, true), "\0");
echo $output;
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37262&edit=1