Skip to content

Commit ef439ec

Browse files
committed
Add missing zend_parse_parameters_none()
1 parent 0040b2a commit ef439ec

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

ext/reflection/php_reflection.c

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,6 +1649,11 @@ ZEND_METHOD(reflection_function, isDisabled)
16491649
zend_function *fptr;
16501650

16511651
GET_REFLECTION_OBJECT_PTR(fptr);
1652+
1653+
if (zend_parse_parameters_none() == FAILURE) {
1654+
return;
1655+
}
1656+
16521657
RETURN_BOOL(fptr->type == ZEND_INTERNAL_FUNCTION && fptr->internal_function.handler == zif_display_disabled_function);
16531658
}
16541659
/* }}} */
@@ -1890,6 +1895,10 @@ ZEND_METHOD(reflection_function, returnsReference)
18901895

18911896
GET_REFLECTION_OBJECT_PTR(fptr);
18921897

1898+
if (zend_parse_parameters_none() == FAILURE) {
1899+
return;
1900+
}
1901+
18931902
RETURN_BOOL((fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0);
18941903
}
18951904
/* }}} */
@@ -1904,6 +1913,10 @@ ZEND_METHOD(reflection_function, getNumberOfParameters)
19041913

19051914
GET_REFLECTION_OBJECT_PTR(fptr);
19061915

1916+
if (zend_parse_parameters_none() == FAILURE) {
1917+
return;
1918+
}
1919+
19071920
num_args = fptr->common.num_args;
19081921
if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) {
19091922
num_args++;
@@ -1922,6 +1935,10 @@ ZEND_METHOD(reflection_function, getNumberOfRequiredParameters)
19221935

19231936
GET_REFLECTION_OBJECT_PTR(fptr);
19241937

1938+
if (zend_parse_parameters_none() == FAILURE) {
1939+
return;
1940+
}
1941+
19251942
RETURN_LONG(fptr->common.required_num_args);
19261943
}
19271944
/* }}} */
@@ -1937,6 +1954,10 @@ ZEND_METHOD(reflection_function, getParameters)
19371954

19381955
GET_REFLECTION_OBJECT_PTR(fptr);
19391956

1957+
if (zend_parse_parameters_none() == FAILURE) {
1958+
return;
1959+
}
1960+
19401961
arg_info= fptr->common.arg_info;
19411962
num_args = fptr->common.num_args;
19421963
if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) {
@@ -1976,6 +1997,10 @@ ZEND_METHOD(reflection_function, getExtension)
19761997

19771998
GET_REFLECTION_OBJECT_PTR(fptr);
19781999

2000+
if (zend_parse_parameters_none() == FAILURE) {
2001+
return;
2002+
}
2003+
19792004
if (fptr->type != ZEND_INTERNAL_FUNCTION) {
19802005
RETURN_NULL();
19812006
}
@@ -1999,6 +2024,10 @@ ZEND_METHOD(reflection_function, getExtensionName)
19992024

20002025
GET_REFLECTION_OBJECT_PTR(fptr);
20012026

2027+
if (zend_parse_parameters_none() == FAILURE) {
2028+
return;
2029+
}
2030+
20022031
if (fptr->type != ZEND_INTERNAL_FUNCTION) {
20032032
RETURN_FALSE;
20042033
}
@@ -2984,6 +3013,10 @@ ZEND_METHOD(reflection_method, getClosure)
29843013
GET_REFLECTION_OBJECT_PTR(mptr);
29853014

29863015
if (mptr->common.fn_flags & ZEND_ACC_STATIC) {
3016+
if (zend_parse_parameters_none() == FAILURE) {
3017+
return;
3018+
}
3019+
29873020
zend_create_fake_closure(return_value, mptr, mptr->common.scope, mptr->common.scope, NULL);
29883021
} else {
29893022
if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) {
@@ -4643,6 +4676,10 @@ ZEND_METHOD(reflection_class, newInstanceWithoutConstructor)
46434676

46444677
GET_REFLECTION_OBJECT_PTR(ce);
46454678

4679+
if (zend_parse_parameters_none() == FAILURE) {
4680+
return;
4681+
}
4682+
46464683
if (ce->type == ZEND_INTERNAL_CLASS
46474684
&& ce->create_object != NULL && (ce->ce_flags & ZEND_ACC_FINAL)) {
46484685
zend_throw_exception_ex(reflection_exception_ptr, 0, "Class %s is an internal class marked as final that cannot be instantiated without invoking its constructor", ZSTR_VAL(ce->name));
@@ -5378,6 +5415,10 @@ ZEND_METHOD(reflection_property, getValue)
53785415
}
53795416

53805417
if (ref->prop.flags & ZEND_ACC_STATIC) {
5418+
if (zend_parse_parameters_none() == FAILURE) {
5419+
return;
5420+
}
5421+
53815422
member_p = zend_read_static_property_ex(intern->ce, ref->unmangled_name, 0);
53825423
if (member_p) {
53835424
ZVAL_COPY_DEREF(return_value, member_p);
@@ -5463,6 +5504,10 @@ ZEND_METHOD(reflection_property, isInitialized)
54635504
}
54645505

54655506
if (ref->prop.flags & ZEND_ACC_STATIC) {
5507+
if (zend_parse_parameters_none() == FAILURE) {
5508+
return;
5509+
}
5510+
54665511
member_p = zend_read_static_property_ex(intern->ce, ref->unmangled_name, 1);
54675512
if (member_p) {
54685513
RETURN_BOOL(!Z_ISUNDEF_P(member_p));

0 commit comments

Comments
 (0)