From: Xinchen Hui Date: Mon, 31 Oct 2011 03:47:11 +0000 (+0000) Subject: Fixed bug #60174 (Notice when array in method prototype error) X-Git-Tag: php-5.4.0RC1~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5921e73a37e488425dc11865ba5e1e3238285a83;p=php Fixed bug #60174 (Notice when array in method prototype error) this should also exists in ext/reflection. since the new warning of "array to string convert" is introduced in zend_make_printable_zval which is used in ext/reflection too --- diff --git a/NEWS b/NEWS index 4a6dfec63e..02a1ce9ae1 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,7 @@ PHP NEWS - Core: . Fixed bug #60120 (proc_open's streams may hang with stdin/out/err when the data exceeds or is equal to 2048 bytes). (Pierre, Pascal Borreli) + . Fixed bug #60174 (Notice when array in method prototype error). Laruence - Oracle Database extension (OCI8): . Increased maxium Oracle error message buffer length for new 11.2.0.3 size diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 727380dac9..47e6f53736 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3133,6 +3133,9 @@ static char * zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{ *(offset++) = '.'; } *(offset++) = '\''; + } else if (Z_TYPE_P(zv) == IS_ARRAY) { + memcpy(offset, "Array", 5); + offset += 5; } else { zend_make_printable_zval(zv, &zv_copy, &use_copy); REALLOC_BUF_IF_EXCEED(buf, offset, length, Z_STRLEN(zv_copy)); @@ -3155,7 +3158,7 @@ static char * zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{ *(offset++) = ' '; } arg_info++; - REALLOC_BUF_IF_EXCEED(buf, offset, length, 23); + REALLOC_BUF_IF_EXCEED(buf, offset, length, 32); } } *(offset++) = ')';