]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #27782 (Wrong behaviour of next(), prev() and each()).
authorIlia Alshanetsky <iliaa@php.net>
Tue, 30 Mar 2004 19:09:10 +0000 (19:09 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 30 Mar 2004 19:09:10 +0000 (19:09 +0000)
NEWS
ext/standard/array.c

diff --git a/NEWS b/NEWS
index d82d0b0b5f6884b3e167d3d8a593ad8aaf9a673d..20b1d42279d800ebf00a55b143ce5a1d09fbca03 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,9 @@ PHP 4                                                                      NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2004, Version 4.3.6
 - Synchronized bundled GD library with GD 2.0.22. (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)
 - Fixed bug #27743 (Make sure Money types are converted and returned
   correctly). (Frank)
index 7052c35778f3be9e66dd9e85331c9ae74dca8591..5a6923ece943347c9fcae06c9a3da128d80bda14 100644 (file)
@@ -718,6 +718,10 @@ 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) {
@@ -746,6 +750,10 @@ 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) {