This commit is contained in:
Stanislav Malyshev 2002-08-01 16:07:19 +00:00
parent b15651c95f
commit 0e7c1f4609
2 changed files with 7 additions and 3 deletions

View File

@ -791,7 +791,11 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
zval *new_zval = &EG(uninitialized_zval);
new_zval->refcount++;
zend_hash_next_index_insert(container->value.ht, &new_zval, sizeof(zval *), (void **) retval);
if (zend_hash_next_index_insert(container->value.ht, &new_zval, sizeof(zval *), (void **) retval) == FAILURE) {
zend_error(E_WARNING, "Cannot add element to the array as the nexxt element is already occupied");
*retval = &EG(uninitialized_zval_ptr);
new_zval->refcount--;
}
} else {
*retval = zend_fetch_dimension_address_inner(container->value.ht, op2, Ts, type TSRMLS_CC);
}

View File

@ -393,7 +393,7 @@ ZEND_API int zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void
}
UPDATE_DATA(ht, p, pData, nDataSize);
HANDLE_UNBLOCK_INTERRUPTIONS();
if (h >= ht->nNextFreeElement) {
if ((long)h >= (long)ht->nNextFreeElement) {
ht->nNextFreeElement = h + 1;
}
if (pDest) {
@ -421,7 +421,7 @@ ZEND_API int zend_hash_index_update_or_next_insert(HashTable *ht, ulong h, void
CONNECT_TO_GLOBAL_DLLIST(p, ht);
HANDLE_UNBLOCK_INTERRUPTIONS();
if (h >= ht->nNextFreeElement) {
if ((long)h >= (long)ht->nNextFreeElement) {
ht->nNextFreeElement = h + 1;
}
ht->nNumOfElements++;