Revert "Add missing zend_parse_parameters_none()"

This reverts commit ef439ec895.
Test failures need to be resolved first.
This commit is contained in:
Christoph M. Becker 2019-10-27 13:41:41 +01:00
parent ef439ec895
commit addc78f379

View file

@ -1649,11 +1649,6 @@ ZEND_METHOD(reflection_function, isDisabled)
zend_function *fptr; zend_function *fptr;
GET_REFLECTION_OBJECT_PTR(fptr); GET_REFLECTION_OBJECT_PTR(fptr);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
RETURN_BOOL(fptr->type == ZEND_INTERNAL_FUNCTION && fptr->internal_function.handler == zif_display_disabled_function); RETURN_BOOL(fptr->type == ZEND_INTERNAL_FUNCTION && fptr->internal_function.handler == zif_display_disabled_function);
} }
/* }}} */ /* }}} */
@ -1895,10 +1890,6 @@ ZEND_METHOD(reflection_function, returnsReference)
GET_REFLECTION_OBJECT_PTR(fptr); GET_REFLECTION_OBJECT_PTR(fptr);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
RETURN_BOOL((fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0); RETURN_BOOL((fptr->op_array.fn_flags & ZEND_ACC_RETURN_REFERENCE) != 0);
} }
/* }}} */ /* }}} */
@ -1913,10 +1904,6 @@ ZEND_METHOD(reflection_function, getNumberOfParameters)
GET_REFLECTION_OBJECT_PTR(fptr); GET_REFLECTION_OBJECT_PTR(fptr);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
num_args = fptr->common.num_args; num_args = fptr->common.num_args;
if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) {
num_args++; num_args++;
@ -1935,10 +1922,6 @@ ZEND_METHOD(reflection_function, getNumberOfRequiredParameters)
GET_REFLECTION_OBJECT_PTR(fptr); GET_REFLECTION_OBJECT_PTR(fptr);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
RETURN_LONG(fptr->common.required_num_args); RETURN_LONG(fptr->common.required_num_args);
} }
/* }}} */ /* }}} */
@ -1954,10 +1937,6 @@ ZEND_METHOD(reflection_function, getParameters)
GET_REFLECTION_OBJECT_PTR(fptr); GET_REFLECTION_OBJECT_PTR(fptr);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
arg_info= fptr->common.arg_info; arg_info= fptr->common.arg_info;
num_args = fptr->common.num_args; num_args = fptr->common.num_args;
if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) { if (fptr->common.fn_flags & ZEND_ACC_VARIADIC) {
@ -1997,10 +1976,6 @@ ZEND_METHOD(reflection_function, getExtension)
GET_REFLECTION_OBJECT_PTR(fptr); GET_REFLECTION_OBJECT_PTR(fptr);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
if (fptr->type != ZEND_INTERNAL_FUNCTION) { if (fptr->type != ZEND_INTERNAL_FUNCTION) {
RETURN_NULL(); RETURN_NULL();
} }
@ -2024,10 +1999,6 @@ ZEND_METHOD(reflection_function, getExtensionName)
GET_REFLECTION_OBJECT_PTR(fptr); GET_REFLECTION_OBJECT_PTR(fptr);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
if (fptr->type != ZEND_INTERNAL_FUNCTION) { if (fptr->type != ZEND_INTERNAL_FUNCTION) {
RETURN_FALSE; RETURN_FALSE;
} }
@ -3013,10 +2984,6 @@ ZEND_METHOD(reflection_method, getClosure)
GET_REFLECTION_OBJECT_PTR(mptr); GET_REFLECTION_OBJECT_PTR(mptr);
if (mptr->common.fn_flags & ZEND_ACC_STATIC) { if (mptr->common.fn_flags & ZEND_ACC_STATIC) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}
zend_create_fake_closure(return_value, mptr, mptr->common.scope, mptr->common.scope, NULL); zend_create_fake_closure(return_value, mptr, mptr->common.scope, mptr->common.scope, NULL);
} else { } else {
if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) { if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) {
@ -4676,10 +4643,6 @@ ZEND_METHOD(reflection_class, newInstanceWithoutConstructor)
GET_REFLECTION_OBJECT_PTR(ce); GET_REFLECTION_OBJECT_PTR(ce);
if (zend_parse_parameters_none() == FAILURE) {
return;
}
if (ce->type == ZEND_INTERNAL_CLASS if (ce->type == ZEND_INTERNAL_CLASS
&& ce->create_object != NULL && (ce->ce_flags & ZEND_ACC_FINAL)) { && ce->create_object != NULL && (ce->ce_flags & ZEND_ACC_FINAL)) {
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)); 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));
@ -5415,10 +5378,6 @@ ZEND_METHOD(reflection_property, getValue)
} }
if (ref->prop.flags & ZEND_ACC_STATIC) { if (ref->prop.flags & ZEND_ACC_STATIC) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}
member_p = zend_read_static_property_ex(intern->ce, ref->unmangled_name, 0); member_p = zend_read_static_property_ex(intern->ce, ref->unmangled_name, 0);
if (member_p) { if (member_p) {
ZVAL_COPY_DEREF(return_value, member_p); ZVAL_COPY_DEREF(return_value, member_p);
@ -5504,10 +5463,6 @@ ZEND_METHOD(reflection_property, isInitialized)
} }
if (ref->prop.flags & ZEND_ACC_STATIC) { if (ref->prop.flags & ZEND_ACC_STATIC) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}
member_p = zend_read_static_property_ex(intern->ce, ref->unmangled_name, 1); member_p = zend_read_static_property_ex(intern->ce, ref->unmangled_name, 1);
if (member_p) { if (member_p) {
RETURN_BOOL(!Z_ISUNDEF_P(member_p)); RETURN_BOOL(!Z_ISUNDEF_P(member_p));