|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-07-12 03:53 UTC] laruence@php.net
[2016-07-12 03:53 UTC] laruence@php.net
-Status: Open
+Status: Closed
[2016-07-20 11:30 UTC] davey@php.net
[2016-10-17 10:11 UTC] bwoebi@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 06:00:01 2025 UTC |
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}"