From:             nelson dot cabral at gmail dot com
Operating system: mac
PHP version:      5.2.5
PHP Bug Type:     Feature/Change Request
Bug description:  request for adding error when deserialising undefined

Description:
------------
Hi,

I lost four hours debbuging a stupid-useless bug. I created an object
Adress and then wanted to give it to another php page via header().
That's what I did : 

## file A.php ##
include (Adress.php); // contains Adress object definition
$temp = new Address();
$_SESSION["temp"] = serialize($temp);
header(Location: B.php);

## file B.php ##
$temp = unserialize($_SESSION[$temp]);
echo $temp->street; // echo nothing because file B doesn't include
Address.php

Two way of finding my error a lot faster : 
- the system could have crashed when I deserialized the object because it
didn'n new the object type
- the system could have crashed when I tried to use the object attribute
for the same reason

Please make a decent programming language out of php, save the world.


-- 
Edit bug report at http://bugs.php.net/?id=43237&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=43237&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=43237&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=43237&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=43237&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=43237&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=43237&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=43237&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=43237&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=43237&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=43237&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=43237&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=43237&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=43237&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=43237&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=43237&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=43237&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=43237&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=43237&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=43237&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=43237&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=43237&r=mysqlcfg

Reply via email to