Skip to content

Promote warnings to exceptions in ext/soap and ext/xmlwriter #5998

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix review
  • Loading branch information
kocsismate committed Aug 31, 2020
commit 09a6b83f92538837bc010b1876d7a275da28633e
5 changes: 4 additions & 1 deletion ext/soap/soap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ PHP_METHOD(SoapServer, addFunction)
key = zend_string_tolower(Z_STR_P(function_name));

if ((f = zend_hash_find_ptr(EG(function_table), key)) == NULL) {
zend_argument_type_error(1, "must be a valid callback, function \"%s\" not found", Z_STRVAL_P(function_name));
zend_argument_type_error(1, "must be a valid function name, function \"%s\" not found", Z_STRVAL_P(function_name));
RETURN_THROWS();
}
if (service->soap_functions.ft == NULL) {
Expand All @@ -1168,6 +1168,9 @@ PHP_METHOD(SoapServer, addFunction)
zend_argument_value_error(1, "must be SOAP_FUNCTIONS_ALL when an integer is passed");
RETURN_THROWS();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't there be one more else below to handle a completely invalid type?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I missed that, thanks!

}
} else {
zend_argument_type_error(1, "must be of type array|string|int, %s given", zend_zval_type_name(function_name));
RETURN_THROWS();
}

SOAP_SERVER_END_CODE();
Expand Down