]> granicus.if.org Git - php/commitdiff
Use reference-counting instead of duplication
authorDmitry Stogov <dmitry@zend.com>
Fri, 19 Jan 2018 10:56:31 +0000 (13:56 +0300)
committerDmitry Stogov <dmitry@zend.com>
Fri, 19 Jan 2018 10:56:31 +0000 (13:56 +0300)
ext/standard/array.c

index 02b80b6d38fd33bbb105f6903c01e320e6337506..0d6a2c1eea06a314c8ea17395934f874f3170853 100644 (file)
@@ -5984,7 +5984,7 @@ PHP_FUNCTION(array_reduce)
 
 
        if (ZEND_NUM_ARGS() > 2) {
-               ZVAL_DUP(&result, initial);
+               ZVAL_COPY(&result, initial);
        } else {
                ZVAL_NULL(&result);
        }