#37670 [Opn->Fbk]: Serialize fails unexpectedly
| From: | bjori@php.net | Date: | Fri, 02 Jun 2006 06:24:13 +0000 |
| Subject: | #37670 [Opn->Fbk]: Serialize fails unexpectedly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-97951@lists.php.net to get a copy of this message | ||
ID: 37670
Updated by: bjori@php.net
Reported By: daniel dot oconnor at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: Class/Object related
Operating System: windows
PHP Version: 5.1.4
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Works just fine for me
Previous Comments:
------------------------------------------------------------------------
[2006-06-02 03:28:23] daniel dot oconnor at gmail dot com
Description:
------------
Serialize does not appear to be serializing fully or safely.
Reproduce code:
---------------
<?php
class BugFeed {
protected $cache;
public function __construct($options) {
if (isset($options["cache"])) {
$this->cache = $options["cache"];
}
}
public function fetch() {}
public static function render($type = "edit") {}
}
$stuff = array(new BugFeed(array()));
print serialize($stuff);
Expected result:
----------------
a serialized string of my BugFeed object, or if it was unable to
properly serialize it, an exception or warning.
Actual result:
--------------
a:1:{i:0;O:7:"BugFeed":1:{s:8:"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37670&edit=1