cvs: ZendEngine2 / zend_execute.c

From: Date: Tue, 01 Jul 2008 13:21:12 +0000
Subject: cvs: ZendEngine2 / zend_execute.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-6835@lists.php.net to get a copy of this message
dmitry Tue Jul 1 13:21:12 2008 UTC Modified files: /ZendEngine2 zend_execute.c Log: Removed redundant code http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.c?r1=1.798&r2=1.799&diff_format=u Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.798 ZendEngine2/zend_execute.c:1.799 --- ZendEngine2/zend_execute.c:1.798 Wed Jun 11 13:19:14 2008 +++ ZendEngine2/zend_execute.c Tue Jul 1 13:21:12 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.c,v 1.798 2008/06/11 13:19:14 dmitry Exp $ */ +/* $Id: zend_execute.c,v 1.799 2008/07/01 13:21:12 dmitry Exp $ */ #define ZEND_INTENSIVE_DEBUGGING 0 @@ -1153,18 +1153,7 @@ 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); @@ -1190,10 +1179,6 @@ 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: */

« previous php.zend-engine.cvs (#6835) next »