summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2012-06-01 15:00:02 +0800
committerXinchen Hui <laruence@php.net>2012-06-01 15:00:02 +0800
commitb548d9ad2e02f3f216320b5f47e26046021a5bac (patch)
treee57397d8d824680541b9bc00c45b3967e3a00acf /ext/reflection/php_reflection.c
parent5ebb0e520f4c31d09d9e5acd323162eca3fee0e3 (diff)
parent1f5327a6022fedc1985d2daa6d189313d808b08b (diff)
downloadphp-git-b548d9ad2e02f3f216320b5f47e26046021a5bac.tar.gz
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: Fixed Bug #62202 (ReflectionParameter::getDefaultValue() memory leaks with constant)
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 1cf65cee16..9346587eb7 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -2561,7 +2561,8 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
*return_value = *precv->op2.zv;
INIT_PZVAL(return_value);
- if (Z_TYPE_P(return_value) != IS_CONSTANT && Z_TYPE_P(return_value) != IS_CONSTANT_ARRAY) {
+ if ((Z_TYPE_P(return_value) & IS_CONSTANT_TYPE_MASK) != IS_CONSTANT
+ && (Z_TYPE_P(return_value) & IS_CONSTANT_TYPE_MASK) != IS_CONSTANT_ARRAY) {
zval_copy_ctor(return_value);
}
zval_update_constant_ex(&return_value, (void*)0, param->fptr->common.scope TSRMLS_CC);