summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2011-10-31 03:47:11 +0000
committerXinchen Hui <laruence@php.net>2011-10-31 03:47:11 +0000
commit725af4c2dd2edb2986041a3b8decb509b66eeabb (patch)
tree39cd081dd929fbbb4befa021307c48f0a6e30fba
parentff72c73ce94b962c63a00f5e3e88d5b47c6fc0f6 (diff)
downloadphp-git-725af4c2dd2edb2986041a3b8decb509b66eeabb.tar.gz
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
-rw-r--r--Zend/zend_compile.c5
1 files changed, 4 insertions, 1 deletions
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++) = ')';