Bug #72581 [NEW]: previous property undefined in Exception after deserialization

From: Date: Mon, 11 Jul 2016 21:57:43 +0000
Subject: Bug #72581 [NEW]: previous property undefined in Exception after deserialization
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-202221@lists.php.net to get a copy of this message
From: maciej dot k dot mrozinski at gmail dot com Operating system: Ubuntu 14.04 PHP version: 5.6.23 Package: *General Issues Bug Type: Bug Bug description:previous property undefined in Exception after deserialization Description: ------------ After serialization and deserialization, Exception object have previous property undefined which is not the case before serialization. Test script: --------------- <?php $e = new Exception('aaa', 200); var_dump($e->__toString()); $a = serialize($e); $b = unserialize($a); var_dump($b->__toString()); Expected result: ---------------- string(162) "exception 'Exception' with message 'aaa' in [...][...]:3 Stack trace: #0 {main}" string(162) "exception 'Exception' with message 'aaa' in [...][...]:3 Stack trace: #0 {main}" Actual result: -------------- string(162) "exception 'Exception' with message 'aaa' in [...][...]:3 Stack trace: #0 {main}" <br /> <b>Notice</b>: Undefined property: Exception::$previous in <b>[...][...]</b> on line <b>11</b><br /> string(162) "exception 'Exception' with message 'aaa' in [...][...]:3 Stack trace: #0 {main}" -- Edit bug report at https://bugs.php.net/bug.php?id=72581&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72581&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72581&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72581&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72581&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72581&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72581&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72581&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72581&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72581&r=support Expected behavior: https://bugs.php.net/fix.php?id=72581&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72581&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72581&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72581&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72581&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72581&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72581&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72581&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72581&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72581&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72581&r=mysqlcfg

« previous php.bugs (#202221) next »