#29865 [Com]: serialize produces invalid output
by Jhargis At Gmail Dot Com other posts by this author
Sep 30 2005 10:17AM messages near this date
#34692 [Opn->Fbk]: Crash during gallery2 configuration
|
#34691 [NEW]: checkdate function doesn't respect ISO 8601
ID: 29865
Comment by: jhargis at gmail dot com
Reported By: aidan@[...].net
Status: No Feedback
Bug Type: Strings related
Operating System: *
PHP Version: 5CVS-2005-03-07
Assigned To: derick
New Comment:
Can confirm this as being corrected and working in 5.0.5 as well.
Previous Comments:
------------------------------------------------------------------------
[2005-09-20 01:00:02] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2005-09-12 08:40:18] sniper@[...].net
Please try using this CVS snapshot:
http://snaps.php.net/php5-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5-win32-latest.zip
------------------------------------------------------------------------
[2005-07-14 22:40:00] php dot net at sharpdreams dot com
Still busted in recent CVS, win32 & FreeBSD. Seems to work in 5.0.4.
This ought to be fixed before the next b3, or at least prior to release
of 5.1.
------------------------------------------------------------------------
[2005-01-22 13:57:12] aidan@[...].net
This is still a problem in the latest head, simple test case:
$ ./php5_1 -r 'class Foo { protected $bar = 1; } $v = new Foo; echo
serialize($v);' | hexdump
0000000 3a4f 3a33 4622 6f6f 3a22 3a31 737b 363a
0000010 223a 2a00 6200 7261 3b22 3a69 3b31 007d
000001f
------------------------------------------------------------------------
[2005-01-06 20:23:42] jhargis at gmail dot com
I have noticed similar.
<?php
class User {
protected $username = "name";
public function getU(){
return $this-> username;
}
}
$ob_User = New User();
$wUser = serialize($ob_User);
echo $wUser;
$wUser2 = unserialize($wUser);
echo $wUser2-> getU() . "<br>\n";
?>
Protected/private members appear to have the 0x00 bytes around the
notation. For the time, I base64 the serialized string so I can store
it in the DB without having to deal with it as a binary. Also, this
may be related to why when using WDDX as the serialization handler it
only picks up the last member var when you need implement __sleep.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/29865
--
Edit this bug report at http://bugs.php.net/?id=29865&edit=1
|