fix #41813 (segmentation fault when using string offset as an object)

patch by judas dot iscariote at gmail dot com
This commit is contained in:
Antony Dovgal 2007-06-27 08:51:40 +00:00
parent abffe87d42
commit 8e26df9523

View File

@ -530,6 +530,10 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode
zval *value = get_zval_ptr(value_op, Ts, &free_value, BP_VAR_R);
zval **retval = &T(result->u.var).var.ptr;
if (!object_ptr) {
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
}
if (*object_ptr == EG(error_zval_ptr)) {
FREE_OP(free_op2);
if (!RETURN_VALUE_UNUSED(result)) {