semi-fix string offsets crash - now it doesn't crash, but still leaks

This commit is contained in:
Stanislav Malyshev 2002-11-13 15:13:24 +00:00
parent 18296252b2
commit 3944ce41c3

View File

@ -782,6 +782,15 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
zval *container;
zval ***retval = &T(result->u.var).var.ptr_ptr;
if (!container_ptr) {
if(T(op1->u.var).EA.type == IS_STRING_OFFSET) {
zend_error(E_WARNING, "Cannot use string offset as an array");
}
*retval = &EG(error_zval_ptr);
SELECTIVE_PZVAL_LOCK(**retval, result);
return;
}
container = *container_ptr;
if (container == EG(error_zval_ptr)) {