ID:               33892
 Updated by:       [EMAIL PROTECTED]
 Reported By:      marcos dot neves at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: any
 PHP Version:      5.1.0b3
 New Comment:

Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #29865.


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

[2005-07-27 22:42:13] marcos dot neves at gmail dot com

Description:
------------
serialized string returned by serialize, contains invalid chars only
when serializing an object with protected or private properties.

Reproduce code:
---------------
<?

class Foo {
        protected $bar = 123;
        //public $bar = 123;
}

$f = new Foo();

echo serialize($f);

?>

Expected result:
----------------
comment protected and uncomment public and the right result is given:

[[O:3:"Foo":1:{s:3:"bar";i:123;}]]

Actual result:
--------------
[[O:3:"Foo":1:{s:6:"
wich means:
[[O:3:"Foo":1:{s:6:"NULL*NULLbar";i:123;}]]
where NULL is the char \0


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


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

Reply via email to