Fixed bug #26148 (Print the notice before modifying variable on type

mismatch).

# This only crashes in ZE1, however logic dictates that it may also crash
# in ZE2 because variable does not have a correct type.

Patch by: morten-bugs dot php dot net at afdelingp dot dk
This commit is contained in:
Ilia Alshanetsky 2003-11-06 20:33:47 +00:00
parent f68114414b
commit c258f9c8a2

View file

@ -485,10 +485,10 @@ ZEND_API void _convert_to_string(zval *op ZEND_FILE_LINE_DC)
break;
}
case IS_ARRAY:
zend_error(E_NOTICE, "Array to string conversion");
zval_dtor(op);
op->value.str.val = estrndup_rel("Array", sizeof("Array")-1);
op->value.str.len = sizeof("Array")-1;
zend_error(E_NOTICE, "Array to string conversion");
break;
case IS_OBJECT:
if (op->value.obj.handlers->cast_object) {