From: Ilia Alshanetsky Date: Tue, 30 Mar 2004 19:09:10 +0000 (+0000) Subject: MFH: Fixed bug #27782 (Wrong behaviour of next(), prev() and each()). X-Git-Tag: php-4.3.6RC1~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=24e9c2b3ffda4de818e5414820db929e745224e5;p=php MFH: Fixed bug #27782 (Wrong behaviour of next(), prev() and each()). --- diff --git a/NEWS b/NEWS index d82d0b0b5f..20b1d42279 100644 --- 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) diff --git a/ext/standard/array.c b/ext/standard/array.c index 7052c35778..5a6923ece9 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -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) {