diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-22 12:41:39 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-22 12:41:39 +0100 |
commit | 787ecb6d567be5759d7b09d727afab5d1060adc8 (patch) | |
tree | 23b036568f7815d9bf6c6b3ce29c4563310cac72 /ext/reflection/php_reflection.c | |
parent | c89f066810a3035eab8244a09e67c046e13c6fe8 (diff) | |
parent | 9457cfca373f9e55eea8cf13ca39b4102003e7a8 (diff) | |
download | php-git-787ecb6d567be5759d7b09d727afab5d1060adc8.tar.gz |
Merge branch 'PHP-7.4'
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); |