ID:               35845
 User updated by:  xing at mac dot com
 Reported By:      xing at mac dot com
 Status:           Open
 Bug Type:         Scripting Engine problem
 Operating System: centos 4.2
 PHP Version:      5.1.2RC1
 New Comment:

dump.txt, captured serialized output, is at:

http://mirror.fictionpress.com/beans/dump.txt


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

[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

Reply via email to