diff options
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r-- | ext/reflection/php_reflection.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index 0510994b89..3928f4c755 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -4147,12 +4147,17 @@ ZEND_METHOD(reflection_class, getMethods) reflection_object *intern; zend_class_entry *ce; zend_function *mptr; - zend_long filter = ZEND_ACC_PPP_MASK | ZEND_ACC_ABSTRACT | ZEND_ACC_FINAL | ZEND_ACC_STATIC; + zend_long filter = 0; + zend_bool filter_is_null = 1; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &filter) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { return; } + if (filter_is_null) { + filter = ZEND_ACC_PPP_MASK | ZEND_ACC_ABSTRACT | ZEND_ACC_FINAL | ZEND_ACC_STATIC; + } + GET_REFLECTION_OBJECT_PTR(ce); array_init(return_value); @@ -4323,11 +4328,16 @@ ZEND_METHOD(reflection_class, getProperties) zend_class_entry *ce; zend_string *key; zend_property_info *prop_info; - zend_long filter = ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC; + zend_long filter = 0; + zend_bool filter_is_null = 1; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l", &filter) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) { return; } + + if (filter_is_null) { + filter = ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC; + } GET_REFLECTION_OBJECT_PTR(ce); |