From: kubis at pawouk dot net
Operating system: WinXP SP2
PHP version: 5.0.3
PHP Bug Type: Session related
Bug description: Wrong deserialization from session when using WDDX serializer
Description:
------------
I have found that sometimes if you have an object A as a member of a
another object B and your try to store the object B in session AND you are
using wddx serializer as default session serializer, after deserialization
back from session the object A in member of object B deserializes wrong.
While using the standard php serializer, all seems working perfectly.
Reproduce code:
---------------
class Logger {
public $logfile;
public $logtype;
function __construct(){
$this->logfile = '/tmp/user.log';
}
// some logger class implementation
}
class User {
public $logger;
function __construct()
$this->logger = new Logger();
}
function __wakeup(){
$this->logger->logtype .... // you won't find '/tmp/user.log' here, you
won't find the $logtype variable at all.
}
Expected result:
----------------
I am expecting that the value of $this->logger->logtype would be the
'/tmp/user.log' string; but there is not any value at all, and it seems
there is not any member 'logfile' at all. While debugging using Zend
studio i have seen that all members of the Logger class have lost their
names; there were just some numbers.
--
Edit bug report at http://bugs.php.net/?id=31502&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31502&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=31502&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=31502&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31502&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31502&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31502&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31502&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31502&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31502&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31502&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=31502&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=31502&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31502&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31502&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31502&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31502&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31502&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31502&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31502&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31502&r=mysqlcfg