Bug #72581 [Opn->Csd]: previous property undefined in Exception after deserialization
| From: | laruence@php.net | Date: | Tue, 12 Jul 2016 03:53:41 +0000 |
| Subject: | Bug #72581 [Opn->Csd]: previous property undefined in Exception after deserialization | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-202223@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72581&edit=1
ID: 72581
Updated by: laruence@php.net
Reported by: maciej dot k dot mrozinski at gmail dot com
Summary: previous property undefined in Exception after
deserialization
-Status: Open
+Status: Closed
Type: Bug
Package: *General Issues
Operating System: Ubuntu 14.04
PHP Version: 5.6.23
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=42902919bc0f97977e116415c9968dc6b23b12d2
Log: Fixed bug #72581 (previous property undefined in Exception after deserialization)
Previous Comments:
------------------------------------------------------------------------
[2016-07-11 21:57:42] 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}"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72581&edit=1