summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2007-02-21 14:11:00 +0000
committerDmitry Stogov <dmitry@php.net>2007-02-21 14:11:00 +0000
commit149dd625bef9a76a5ac5d7652bab7d0b490b3f9c (patch)
tree5654b508d0374c805cbc78c956e06497f9af4605
parentd4ccfade57301ac18172883a13a938d3c0568e35 (diff)
downloadphp-git-149dd625bef9a76a5ac5d7652bab7d0b490b3f9c.tar.gz
Special case for last iteration
-rw-r--r--Zend/zend_hash.c4
1 files changed, 3 insertions, 1 deletions
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);