diff options
| author | Dmitry Stogov <dmitry@php.net> | 2008-07-01 13:20:48 +0000 |
|---|---|---|
| committer | Dmitry Stogov <dmitry@php.net> | 2008-07-01 13:20:48 +0000 |
| commit | 578cfc6088b764dd50c21c9746d04a082fcae497 (patch) | |
| tree | a539208e3b5e3a0905b08b7937247678f58b9adf | |
| parent | 2a35fb373fe410b33cd301794ccf2321cd9c9700 (diff) | |
| download | php-git-578cfc6088b764dd50c21c9746d04a082fcae497.tar.gz | |
Removed redundant code
| -rw-r--r-- | Zend/zend_execute.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 949a784a2a..e758477ca0 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1047,18 +1047,7 @@ static void zend_fetch_dimension_address_read(temp_variable *result, zval **cont switch (Z_TYPE_P(container)) { case IS_ARRAY: - if (dim == NULL) { - zval *new_zval = &EG(uninitialized_zval); - - Z_ADDREF_P(new_zval); - if (zend_hash_next_index_insert(Z_ARRVAL_P(container), &new_zval, sizeof(zval *), (void **) &retval) == FAILURE) { - zend_error(E_WARNING, "Cannot add element to the array as the next element is already occupied"); - retval = &EG(error_zval_ptr); - Z_DELREF_P(new_zval); - } - } else { - retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, type TSRMLS_CC); - } + retval = zend_fetch_dimension_address_inner(Z_ARRVAL_P(container), dim, type TSRMLS_CC); if (result) { AI_SET_PTR(result->var, *retval); PZVAL_LOCK(*retval); @@ -1082,10 +1071,6 @@ static void zend_fetch_dimension_address_read(temp_variable *result, zval **cont case IS_STRING: { zval tmp; - if (dim == NULL) { - zend_error_noreturn(E_ERROR, "[] operator not supported for strings"); - } - if (Z_TYPE_P(dim) != IS_LONG) { switch(Z_TYPE_P(dim)) { /* case IS_LONG: */ |
