@@ -4246,15 +4246,14 @@ ZEND_METHOD(reflection_class, getMethods)
4246
4246
reflection_object * intern ;
4247
4247
zend_class_entry * ce ;
4248
4248
zend_long filter = 0 ;
4249
- int argc = ZEND_NUM_ARGS () ;
4249
+ zend_bool filter_is_null = 1 ;
4250
4250
4251
4251
METHOD_NOTSTATIC (reflection_class_ptr );
4252
- if (argc ) {
4253
- if (zend_parse_parameters (argc , "|l" , & filter ) == FAILURE ) {
4254
- return ;
4255
- }
4256
- } else {
4257
- /* No parameters given, default to "return all" */
4252
+ if (zend_parse_parameters (ZEND_NUM_ARGS (), "|l!" , & filter , & filter_is_null ) == FAILURE ) {
4253
+ return ;
4254
+ }
4255
+
4256
+ if (filter_is_null ) {
4258
4257
filter = ZEND_ACC_PPP_MASK | ZEND_ACC_ABSTRACT | ZEND_ACC_FINAL | ZEND_ACC_STATIC ;
4259
4258
}
4260
4259
@@ -4442,15 +4441,14 @@ ZEND_METHOD(reflection_class, getProperties)
4442
4441
reflection_object * intern ;
4443
4442
zend_class_entry * ce ;
4444
4443
zend_long filter = 0 ;
4445
- int argc = ZEND_NUM_ARGS () ;
4444
+ zend_bool filter_is_null = 1 ;
4446
4445
4447
4446
METHOD_NOTSTATIC (reflection_class_ptr );
4448
- if (argc ) {
4449
- if (zend_parse_parameters (argc , "|l" , & filter ) == FAILURE ) {
4450
- return ;
4451
- }
4452
- } else {
4453
- /* No parameters given, default to "return all" */
4447
+ if (zend_parse_parameters (ZEND_NUM_ARGS (), "|l!" , & filter , & filter_is_null ) == FAILURE ) {
4448
+ return ;
4449
+ }
4450
+
4451
+ if (filter_is_null ) {
4454
4452
filter = ZEND_ACC_PPP_MASK | ZEND_ACC_STATIC ;
4455
4453
}
4456
4454
0 commit comments