summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index d4f89be69f..7b9c37d1eb 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -4190,7 +4190,7 @@ ZEND_METHOD(ReflectionClass, getMethods)
reflection_object *intern;
zend_class_entry *ce;
zend_function *mptr;
- zend_long filter = 0;
+ zend_long filter;
zend_bool filter_is_null = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) {
@@ -4366,7 +4366,7 @@ ZEND_METHOD(ReflectionClass, getProperties)
zend_class_entry *ce;
zend_string *key;
zend_property_info *prop_info;
- zend_long filter = 0;
+ zend_long filter;
zend_bool filter_is_null = 1;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "|l!", &filter, &filter_is_null) == FAILURE) {
@@ -4422,12 +4422,17 @@ ZEND_METHOD(ReflectionClass, getConstants)
zend_string *key;
zend_class_constant *constant;
zval val;
- zend_long filter = ZEND_ACC_PPP_MASK;
+ zend_long filter;
+ 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_THROWS();
}
+ if (filter_is_null) {
+ filter = ZEND_ACC_PPP_MASK;
+ }
+
GET_REFLECTION_OBJECT_PTR(ce);
array_init(return_value);
@@ -4452,12 +4457,17 @@ ZEND_METHOD(ReflectionClass, getReflectionConstants)
zend_class_entry *ce;
zend_string *name;
zend_class_constant *constant;
- zend_long filter = ZEND_ACC_PPP_MASK;
+ zend_long filter;
+ 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_THROWS();
}
+ if (filter_is_null) {
+ filter = ZEND_ACC_PPP_MASK;
+ }
+
GET_REFLECTION_OBJECT_PTR(ce);
array_init(return_value);