diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-22 12:40:21 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-03-22 12:41:02 +0100 |
commit | 620a753185e575c8d48779764f376f6227b6e293 (patch) | |
tree | 1635e1af08b95daf0b0c64b5a4e7d6238fdff81b /ext/reflection/php_reflection.c | |
parent | 5c8d69bf6fde2bbb3d6c168833bc9a70f0a5bc1f (diff) | |
parent | da35fa2cb8d454c8e797067e28e647030a5fe5df (diff) | |
download | php-git-620a753185e575c8d48779764f376f6227b6e293.tar.gz |
Merge branch 'PHP-7.2' into PHP-7.3
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 748f5b3f08..2fa073cbea 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -4191,12 +4191,17 @@ ZEND_METHOD(reflection_class, getMethods) { reflection_object *intern; zend_class_entry *ce; - 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); @@ -4377,11 +4382,16 @@ ZEND_METHOD(reflection_class, getProperties) { reflection_object *intern; zend_class_entry *ce; - 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); |