]> granicus.if.org Git - php/commitdiff
Fixed wrong array to string convertion
authorXinchen Hui <laruence@gmail.com>
Mon, 24 Feb 2014 09:30:39 +0000 (17:30 +0800)
committerXinchen Hui <laruence@gmail.com>
Mon, 24 Feb 2014 09:30:39 +0000 (17:30 +0800)
Zend/zend.c

index 485c6a3880350d81035fdfe7ad6d42f45988685a..532cdf35e2d3f09f89fb3b486b2efdb58093eb75 100644 (file)
@@ -248,7 +248,7 @@ ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_cop
                case IS_ARRAY:
                        zend_error(E_NOTICE, "Array to string conversion");
                        // TODO: ??? use interned string
-                       Z_STR_P(expr_copy) = STR_INIT("Array", 1, 0);
+                       Z_STR_P(expr_copy) = STR_INIT("Array", sizeof("Array") - 1, 0);
                        break;
                case IS_OBJECT:
                        {