From: Stanislav Malyshev Date: Tue, 4 Aug 2015 23:46:53 +0000 (-0700) Subject: fix merge X-Git-Tag: php-7.0.0beta3~1^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e416bba90860a7037cfa66d6725dc33a3436bea;p=php fix merge --- diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index f03bc40e47..250db365cd 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -282,12 +282,11 @@ ZEND_METHOD(exception, __construct) /* {{{ proto Exception::__wakeup() Exception unserialize checks */ #define CHECK_EXC_TYPE(name, type) \ - zend_read_property(i_get_exception_base(object), (object), name, sizeof(name) - 1, 1, &value); \ - if(value && Z_TYPE_P(value) != type) { \ - zval *tmp; \ - MAKE_STD_ZVAL(tmp); \ - ZVAL_STRINGL(tmp, name, sizeof(name)-1, 1); \ - Z_OBJ_HANDLER_P(object, unset_property)(object, tmp, 0 TSRMLS_CC); \ + if(zend_read_property(i_get_exception_base(object), (object), name, sizeof(name) - 1, 1, &value) != &EG(uninitialized_zval) \ + && Z_TYPE(value) != type) { \ + zval tmp; \ + ZVAL_STRINGL(&tmp, name, sizeof(name) - 1); \ + Z_OBJ_HANDLER_P(object, unset_property)(object, &tmp, NULL); \ zval_ptr_dtor(&tmp); \ } diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index 1ec6ea17b2..0c273a26b4 100644 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -1741,7 +1741,7 @@ SPL_METHOD(Array, unserialize) goto outexcept; } - var_push_dtor(&var_hash, &pflags); + var_push_dtor(&var_hash, &zflags); --p; /* for ';' */ flags = Z_LVAL(zflags); /* flags needs to be verified and we also need to verify whether the next @@ -1783,7 +1783,7 @@ SPL_METHOD(Array, unserialize) goto outexcept; } - var_push_dtor(&var_hash, &pmembers); + var_push_dtor(&var_hash, &members); /* copy members */ object_properties_load(&intern->std, Z_ARRVAL(members)); zval_ptr_dtor(&members); @@ -1791,9 +1791,6 @@ SPL_METHOD(Array, unserialize) /* done reading $serialized */ PHP_VAR_UNSERIALIZE_DESTROY(var_hash); - if (pflags) { - zval_ptr_dtor(&pflags); - } return; outexcept: