From: Antony Dovgal Date: Thu, 7 Aug 2008 11:50:51 +0000 (+0000) Subject: fix WS X-Git-Tag: BEFORE_HEAD_NS_CHANGE~832 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc7779fd30348de1734c0cbd1e902e58759980ae;p=php fix WS --- diff --git a/Zend/zend_hash.c b/Zend/zend_hash.c index d95d2b7d11..027bf69533 100644 --- a/Zend/zend_hash.c +++ b/Zend/zend_hash.c @@ -1670,28 +1670,28 @@ ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, zstr s if (q == p) { found = 1; } else if (!q->nKeyLength && q->h == num_index) { - if (found) { - if (mode & HASH_UPDATE_KEY_IF_BEFORE) { - break; - } else { - if (p->nKeyLength) { + if (found) { + if (mode & HASH_UPDATE_KEY_IF_BEFORE) { + break; + } else { + if (p->nKeyLength) { zend_u_hash_del(ht, p->key.type, ZSTR(p->key.arKey.s), p->nKeyLength); } else { zend_hash_index_del(ht, p->h); } - return FAILURE; - } - } else { - if (mode & HASH_UPDATE_KEY_IF_AFTER) { - break; - } else { - if (p->nKeyLength) { + return FAILURE; + } + } else { + if (mode & HASH_UPDATE_KEY_IF_AFTER) { + break; + } else { + if (p->nKeyLength) { zend_u_hash_del(ht, p->key.type, ZSTR(p->key.arKey.s), p->nKeyLength); } else { zend_hash_index_del(ht, p->h); } - return FAILURE; - } + return FAILURE; + } } } q = q->pNext; @@ -1718,29 +1718,29 @@ ZEND_API int zend_hash_update_current_key_ex(HashTable *ht, int key_type, zstr s found = 1; } else if (q->h == h && q->nKeyLength == str_length && q->key.type == key_type && - memcmp(q->key.arKey.s, str_index.v, real_length) == 0) { - if (found) { - if (mode & HASH_UPDATE_KEY_IF_BEFORE) { - break; - } else { - if (p->nKeyLength) { + memcmp(q->key.arKey.s, str_index.v, real_length) == 0) { + if (found) { + if (mode & HASH_UPDATE_KEY_IF_BEFORE) { + break; + } else { + if (p->nKeyLength) { zend_u_hash_del(ht, p->key.type, ZSTR(p->key.arKey.s), p->nKeyLength); } else { zend_hash_index_del(ht, p->h); } - return FAILURE; - } - } else { - if (mode & HASH_UPDATE_KEY_IF_AFTER) { - break; - } else { - if (p->nKeyLength) { + return FAILURE; + } + } else { + if (mode & HASH_UPDATE_KEY_IF_AFTER) { + break; + } else { + if (p->nKeyLength) { zend_u_hash_del(ht, p->key.type, ZSTR(p->key.arKey.s), p->nKeyLength); } else { zend_hash_index_del(ht, p->h); } - return FAILURE; - } + return FAILURE; + } } } q = q->pNext;