]> granicus.if.org Git - php/commitdiff
- Fixed bug: #21998 (array_pop() did not reset the current array position)
authorfoobar <sniper@php.net>
Mon, 3 Feb 2003 16:57:02 +0000 (16:57 +0000)
committerfoobar <sniper@php.net>
Mon, 3 Feb 2003 16:57:02 +0000 (16:57 +0000)
# This behaves now same as in PHP 4.2.3

ext/standard/array.c

index a1119acb37251a430d7401c104fc6c082621f1c2..a01459f90db29eeaaed0e22d304f21b082c5f7ad 100644 (file)
@@ -1823,6 +1823,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));
 }
 /* }}} */