From: Dmitry Stogov Date: Wed, 21 Feb 2007 14:11:00 +0000 (+0000) Subject: Special case for last iteration X-Git-Tag: php-5.2.2RC1~340 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=149dd625bef9a76a5ac5d7652bab7d0b490b3f9c;p=php Special case for last iteration --- diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index a5faafefed..c3e0ae4394 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -1025,7 +1025,9 @@ ZEND_API int zend_hash_get_pointer(HashTable *ht, HashPointer *ptr) ZEND_API int zend_hash_set_pointer(HashTable *ht, const HashPointer *ptr) { - if (ht->pInternalPointer != ptr->pos) { + if (ptr->pos == NULL) { + ht->pInternalPointer = NULL; + } else if (ht->pInternalPointer != ptr->pos) { Bucket *p; IS_CONSISTENT(ht);