summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2010-05-25 22:46:17 +0000
committerFelipe Pena <felipe@php.net>2010-05-25 22:46:17 +0000
commitf3009cb59604bfe0281153f64caa9d113444c54d (patch)
treec20b91ee428181dbf4beaea43c8b722a7c27aefc /ext/reflection/php_reflection.c
parentc5ff0eb5b8dfcc90647fae949dc3f0163693ffcd (diff)
downloadphp-git-f3009cb59604bfe0281153f64caa9d113444c54d.tar.gz
- Fixed bug #51911 (ReflectionParameter::getDefaultValue() memory leaks with constant array)
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 98928b3b0e..6a35bf54c2 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -2408,7 +2408,7 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
*return_value = precv->op2.u.constant;
INIT_PZVAL(return_value);
- if (Z_TYPE_P(return_value) != IS_CONSTANT) {
+ if (Z_TYPE_P(return_value) != IS_CONSTANT && Z_TYPE_P(return_value) != IS_CONSTANT_ARRAY) {
zval_copy_ctor(return_value);
}
zval_update_constant_ex(&return_value, (void*)0, param->fptr->common.scope TSRMLS_CC);