#35845 [NEW]: deserialization problem
| From: | xing at mac dot com | Date: | Fri, 30 Dec 2005 00:38:31 +0000 |
| Subject: | #35845 [NEW]: deserialization problem | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-91238@lists.php.net to get a copy of this message | ||
From: xing at mac dot com
Operating system: centos 4.2
PHP version: 5.1.2RC1
PHP Bug Type: Scripting Engine problem
Bug description: deserialization problem
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 bug report at http://bugs.php.net/?id=35845&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35845&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35845&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35845&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35845&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35845&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35845&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35845&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35845&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35845&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35845&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35845&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35845&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35845&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35845&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35845&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35845&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35845&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35845&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35845&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35845&r=mysqlcfg