]> granicus.if.org Git - php/commitdiff
Fixed build on windows
authorXinchen Hui <laruence@php.net>
Sat, 14 Feb 2015 04:57:53 +0000 (12:57 +0800)
committerXinchen Hui <laruence@php.net>
Sat, 14 Feb 2015 04:57:53 +0000 (12:57 +0800)
ext/spl/spl_array.c

index 5cdd333688912c2b2ab2dcba3ae73b6ec98ae517..2796ca650118ad6d3d8adbbefd5c461fe91c3817 100644 (file)
@@ -1164,8 +1164,8 @@ static void spl_array_set_array(zval *object, spl_array_object *intern, zval *ar
                //??? TODO: try to avoid array duplication
                ZVAL_DUP(&intern->array, array);
        } else {
-               ZVAL_COPY(&intern->array, array);
                zend_object_get_properties_t handler = Z_OBJ_HANDLER_P(array, get_properties);
+               ZVAL_COPY(&intern->array, array);
                if ((handler != std_object_handlers.get_properties && handler != spl_array_get_properties)
                || !spl_array_get_hash_table(intern, 0)) {
                        zend_throw_exception_ex(spl_ce_InvalidArgumentException, 0, "Overloaded object of type %s is not compatible with %s", Z_OBJCE_P(array)->name, intern->std.ce->name);