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

Just put the dump.txt file within the same folder as the included code
and run.


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

[2005-12-30 06:46:25] [EMAIL PROTECTED]

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

Reply via email to