#35845 [Opn->Bgs]: deserialization problem
| From: | tony2001@php.net | Date: | Fri, 30 Dec 2005 09:29:06 +0000 |
| Subject: | #35845 [Opn->Bgs]: deserialization problem | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-91255@lists.php.net to get a copy of this message | ||
ID: 35845
Updated by: tony2001@php.net
Reported By: xing at mac dot com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: centos 4.2
PHP Version: 5.1.2RC1
New Comment:
Fix your data, it's broken:
s:15:"King<92>s Blades";
Previous Comments:
------------------------------------------------------------------------
[2005-12-30 07:34:28] xing at mac dot com
Just put the dump.txt file within the same folder as the included code
and run.
------------------------------------------------------------------------
[2005-12-30 06:46:25] sniper@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc.
If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2005-12-30 01:43:36] xing at mac dot com
dump.txt, captured serialized output, is at:
http://mirror.fictionpress.com/beans/dump.txt
------------------------------------------------------------------------
[2005-12-30 01:38:31] xing at mac dot com
Description:
------------
cannot deserialize an serialized output...
the serialized object is an array of query_result objects which contain
an "result" element which is an array of simple objects.
Reproduce code:
---------------
<?
class query_result {
public $affected_rows = 0;
public $num_rows = 0;
public $insert_id = 0;
public $result = array(); //pdo result
public $pointer = 0;
}
$dump = unserialize(file_get_contents("dump.txt"));
if($dump == NULL) {
echo "error";
}
else if(is_array($dump)) {
echo "not error";
}
else {
echo "huh? {$dump}";
}
?>
Expected result:
----------------
not error
Actual result:
--------------
error
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=35845&edit=1