mirror of
https://github.com/php/php-src.git
synced 2024-11-28 12:26:37 +08:00
Fixed Bug #62202 (ReflectionParameter::getDefaultValue() memory leaks with constant)
This commit is contained in:
parent
fa05f038cb
commit
1f5327a602
4
NEWS
4
NEWS
@ -35,6 +35,10 @@ PHP NEWS
|
||||
pattern). (Gustavo)
|
||||
. Fixed bug #60785 (memory leak in IntlDateFormatter constructor). (Gustavo)
|
||||
|
||||
- Reflection:
|
||||
. Fixed bug #62202 (ReflectionParameter::getDefaultValue() memory leaks
|
||||
with constant). (Laruence)
|
||||
|
||||
- XML Writer:
|
||||
. Fixed bug #62064 (memory leak in the XML Writer module).
|
||||
(jean-pierre dot lozi at lip6 dot fr)
|
||||
|
@ -2420,7 +2420,8 @@ ZEND_METHOD(reflection_parameter, getDefaultValue)
|
||||
|
||||
*return_value = precv->op2.u.constant;
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user