]> granicus.if.org Git - php/commitdiff
fix merge
authorStanislav Malyshev <stas@php.net>
Tue, 4 Aug 2015 23:46:53 +0000 (16:46 -0700)
committerStanislav Malyshev <stas@php.net>
Tue, 4 Aug 2015 23:46:53 +0000 (16:46 -0700)
Zend/zend_exceptions.c
ext/spl/spl_array.c

index f03bc40e470d8c1f5f38dd304e11ee4a1c69e73b..250db365cde0a3cde26d281ba54a42732b287ee1 100644 (file)
@@ -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); \
        }
 
index 1ec6ea17b2db0b33feed099e1e34b84288a9f54c..0c273a26b417653ca9b8372ab92d6c69b924a4f2 100644 (file)
@@ -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: