?? ??? 2016 PHP 7.0.10
- Core:
+ . Fixed bug #72581 (previous property undefined in Exception after
+ deserialization). (Laruence)
. Fixed bug #72496 (Cannot declare public method with signature incompatible
with parent private method). (Pedro Magalhães)
. Fixed bug #72024 (microtime() leaks memory). (maroszek at gmx dot net)
--- /dev/null
+--TEST--
+Bug #72581 (previous property undefined in Exception after deserialization)
+--FILE--
+<?php
+
+$e = new Exception('aaa', 200);
+
+$a = serialize($e);
+
+$b = unserialize($a);
+
+var_dump($b->__toString());
+?>
+--EXPECTF--
+string(%s) "Exception: aaa in %sbug72581.php:%d
+Stack trace:
+#0 {main}"
/* {{{ proto Exception::__wakeup()
Exception unserialize checks */
#define CHECK_EXC_TYPE(name, type) \
- ZVAL_UNDEF(&value); \
pvalue = zend_read_property(i_get_exception_base(object), (object), name, sizeof(name) - 1, 1, &value); \
- if(Z_TYPE_P(pvalue) != IS_UNDEF && Z_TYPE_P(pvalue) != type) { \
+ if (Z_TYPE_P(pvalue) != IS_NULL && Z_TYPE_P(pvalue) != type) { \
zval tmp; \
ZVAL_STRINGL(&tmp, name, sizeof(name) - 1); \
Z_OBJ_HANDLER_P(object, unset_property)(object, &tmp, NULL); \