]> granicus.if.org Git - php/commitdiff
Fixed BC break of php_debug_zval_dump
authortwosee <twose@qq.com>
Sat, 11 Jul 2020 10:30:28 +0000 (18:30 +0800)
committertwosee <twose@qq.com>
Sat, 11 Jul 2020 10:30:28 +0000 (18:30 +0800)
It introduced by fixing bug #79830

ext/standard/var.c

index 618b34bea7715c8b15379b6ba886dc700d984eb9..10673d852af65776c776f556939b4387f596529b 100644 (file)
@@ -300,7 +300,7 @@ again:
                        GC_ADDREF(myht);
                }
                count = zend_array_count(myht);
-               php_printf("%sarray(%d) refcount(%u){\n", COMMON, count, Z_REFCOUNTED_P(struc) ? Z_REFCOUNT_P(struc) : 1);
+               php_printf("%sarray(%d) refcount(%u){\n", COMMON, count, Z_REFCOUNTED_P(struc) ? Z_REFCOUNT_P(struc) - 1 : 1);
                ZEND_HASH_FOREACH_KEY_VAL_IND(myht, index, key, val) {
                        zval_array_element_dump(val, index, key, level);
                } ZEND_HASH_FOREACH_END();