previous property undefined in Exception after deserialization
[2016-07-11 21:57 UTC] maciej dot k dot mrozinski at gmail dot com
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}"