From: Ilia Alshanetsky Date: Thu, 6 Nov 2003 20:33:47 +0000 (+0000) Subject: Fixed bug #26148 (Print the notice before modifying variable on type X-Git-Tag: php-5.0.0b3RC1~756 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c258f9c8a29262d95dfa6da753ed0bc2b00d0c01;p=php 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 --- diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 60ac369320..f95a6f6aeb 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -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) {