ID:               44792
 Updated by:       [EMAIL PROTECTED]
 Reported By:      alex at fav dot or dot it
-Status:           Open
+Status:           Assigned
-Bug Type:         Strings related
+Bug Type:         Scripting Engine problem
 Operating System: *
 PHP Version:      5.2.5
-Assigned To:      
+Assigned To:      helly
 New Comment:

Marcus, yet another PPP issue.


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

[2008-04-21 11:14:12] alex at fav dot or dot it

Description:
------------
The output from the serialization of objects that contain protected
(and possibly private also) members contains null characters. These
characters are unnecessary and can cause problems when inserting the
serialized data into databases.

An asterisk is placed before the variable name in the serialized
string, which I assume is to mark it as protected. This asterisk is
surrounded by null characters.

This appears to be the same as the closed #29865 (closed 10/2005), but
in version 5.2.5 and the latest snapshot, the bug still exists.

Reproduce code:
---------------
php -r 'class Foo { protected $bar = 1; } $v = new Foo; echo
serialize($v);' | hexdump

Expected result:
----------------
The output should not contain null characters (shown as '00') around
the asterisk.

Actual result:
--------------
0000000 3a4f 3a33 4622 6f6f 3a22 3a31 737b 363a
0000010 223a 2a00 6200 7261 3b22 3a69 3b31 007d
000001f


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


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

Reply via email to