From: Xinchen Hui Date: Tue, 12 Jul 2016 03:52:21 +0000 (+0800) Subject: Merge branch 'PHP-7.0' X-Git-Tag: php-7.1.0beta1~103 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0478e431cfa24476f6eed1cfbf30250c549aa59d;p=php Merge branch 'PHP-7.0' * PHP-7.0: Fixed bug #72581 (previous property undefined in Exception after deserialization) Conflicts: Zend/zend_exceptions.c --- 0478e431cfa24476f6eed1cfbf30250c549aa59d diff --cc Zend/zend_exceptions.c index f73dde1a97,374f3045b3..7fd55a4fc8 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@@ -302,12 -290,11 +302,11 @@@ ZEND_METHOD(exception, __construct /* {{{ proto Exception::__wakeup() Exception unserialize checks */ -#define CHECK_EXC_TYPE(name, type) \ - pvalue = zend_read_property(i_get_exception_base(object), (object), name, sizeof(name) - 1, 1, &value); \ +#define CHECK_EXC_TYPE(id, type) \ - ZVAL_UNDEF(&value); \ + pvalue = zend_read_property_ex(i_get_exception_base(object), (object), CG(known_strings)[id], 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); \ + ZVAL_STR_COPY(&tmp, CG(known_strings)[id]); \ Z_OBJ_HANDLER_P(object, unset_property)(object, &tmp, NULL); \ zval_ptr_dtor(&tmp); \ }