summaryrefslogtreecommitdiff
path: root/Zend/zend_execute.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2002-08-01 16:07:19 +0000
committerStanislav Malyshev <stas@php.net>2002-08-01 16:07:19 +0000
commit0e7c1f460941d5e824982d62672ec189dd683a2d (patch)
treeddfbcee747785d08bd46a7a4e080e0fc1e33269f /Zend/zend_execute.c
parentb15651c95f43993d32855913ca32545b594a98af (diff)
downloadphp-git-0e7c1f460941d5e824982d62672ec189dd683a2d.tar.gz
MFZE1
Diffstat (limited to 'Zend/zend_execute.c')
-rw-r--r--Zend/zend_execute.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c
index 573e2c384d..fb0f8b0835 100644
--- a/Zend/zend_execute.c
+++ b/Zend/zend_execute.c
@@ -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);
}