]> granicus.if.org Git - php/commitdiff
Fixed bug #26148 (Print the notice before modifying variable on type
authorIlia Alshanetsky <iliaa@php.net>
Thu, 6 Nov 2003 20:33:47 +0000 (20:33 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 6 Nov 2003 20:33:47 +0000 (20:33 +0000)
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

Zend/zend_operators.c

index 60ac36932079303a56bb13592454f5eddf45ccbb..f95a6f6aeb2322b06be2a45021f2ff67ef5df503 100644 (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) {