]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug: #21998 (array_pop() did not reset the current array position)
authorfoobar <sniper@php.net>
Mon, 3 Feb 2003 16:58:08 +0000 (16:58 +0000)
committerfoobar <sniper@php.net>
Mon, 3 Feb 2003 16:58:08 +0000 (16:58 +0000)
ext/standard/array.c

index a821dffe422b8bee782068521d6cd90a85260ca4..27e990f7c78da09ac8f1f77507f80999ad786e4a 100644 (file)
@@ -1733,6 +1733,8 @@ static void _phpi_pop(INTERNAL_FUNCTION_PARAMETERS, int off_the_end)
        } else if (!key_len) {
                Z_ARRVAL_PP(stack)->nNextFreeElement = Z_ARRVAL_PP(stack)->nNextFreeElement - 1;
        }
+
+       zend_hash_internal_pointer_reset(Z_ARRVAL_PP(stack));
 }
 /* }}} */