]> granicus.if.org Git - php/commitdiff
Revert patch for bug #27782.
authorIlia Alshanetsky <iliaa@php.net>
Thu, 1 Apr 2004 19:07:02 +0000 (19:07 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 1 Apr 2004 19:07:02 +0000 (19:07 +0000)
NEWS
ext/standard/array.c
ext/standard/tests/array/bug27782.phpt [deleted file]

diff --git a/NEWS b/NEWS
index b93857c01e7c9faf271f75930fa3735707042f08..5ad56d18349f7287185a03566a7f6128ebd1305f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,7 +8,6 @@ PHP 4                                                                      NEWS
 - Fixed bug #27809 (ftp_systype returns null on some ftp servers). (Ilia)
 - Fixed bug #27802 (default number of children to 8 when PHP_FCGI_CHILDREN is
   not defined). (Ilia)
-- Fixed bug #27782 (Wrong behaviour of next(), prev() and each()). (Ilia)
 - Fixed bug #27764 (Get return value from a stored procedure not returning any
   result sets). (Frank)
 - Fixed bug #27762 (SCO Openserver doesn't have S_ISSOCK). (Wez)
index 5a6923ece943347c9fcae06c9a3da128d80bda14..7052c35778f3be9e66dd9e85331c9ae74dca8591 100644 (file)
@@ -718,10 +718,6 @@ PHP_FUNCTION(prev)
                RETURN_FALSE;
        }
        zend_hash_move_backwards(target_hash);
-       if (!target_hash->pInternalPointer) {
-               zend_hash_internal_pointer_reset(target_hash);
-               RETURN_FALSE;
-       }
 
        if (return_value_used) {        
                if (zend_hash_get_current_data(target_hash, (void **) &entry) == FAILURE) {
@@ -750,10 +746,6 @@ PHP_FUNCTION(next)
                RETURN_FALSE;
        }
        zend_hash_move_forward(target_hash);
-       if (!target_hash->pInternalPointer) {
-               zend_hash_internal_pointer_end(target_hash);
-               RETURN_FALSE;
-       }
 
        if (return_value_used) {
                if (zend_hash_get_current_data(target_hash, (void **) &entry) == FAILURE) {
diff --git a/ext/standard/tests/array/bug27782.phpt b/ext/standard/tests/array/bug27782.phpt
deleted file mode 100644 (file)
index 2c8c675..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
---TEST--
-Bug #27782 (each(), next(), prev() mange array position)
---FILE--
-<?php
-$a = array("a", "b", "c");
-reset($a);
-
-while (next($a) !== false);
-
-echo current($a) . "\n";
-echo prev($a) . "\n";
-
-reset($a);
-
-while (list(,$foo) = each($a)) {
-       echo $foo . "\n";
-}
-echo current($a) . "\n";
-
-while ($foo = prev($a)) {
-       echo $foo . "\n";
-}
-?>
---EXPECT--
-c
-b
-a
-b
-c
-c
-b
-a