1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00

be consistent with write_dimension

This commit is contained in:
Stanislav Malyshev
2004-07-14 09:04:13 +00:00
parent 28d72ce2fd
commit d673ec0184
+4 -5
View File
@@ -384,12 +384,11 @@ zval *zend_std_read_dimension(zval *object, zval *offset, int type TSRMLS_DC)
if(offset == NULL) {
/* [] construct */
zval offset_null;
ZVAL_NULL(&offset_null);
zend_call_method_with_1_params(&object, ce, NULL, "offsetget", &retval, &offset_null);
zval_dtor(&offset_null); /* just in case */
} else {
zend_call_method_with_1_params(&object, ce, NULL, "offsetget", &retval, offset);
INIT_ZVAL(offset_null);
offset = &offset_null;
}
zend_call_method_with_1_params(&object, ce, NULL, "offsetget", &retval, offset);
if (!retval) {
if (!EG(exception)) {
zend_error(E_ERROR, "Undefined offset for object of type %s used as array", ce->name);