Skip to content

Commit ddd01cc

Browse files
committed
Fix review
1 parent 955f289 commit ddd01cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ext/soap/soap.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ PHP_METHOD(SoapServer, addFunction)
11451145
key = zend_string_tolower(Z_STR_P(function_name));
11461146

11471147
if ((f = zend_hash_find_ptr(EG(function_table), key)) == NULL) {
1148-
zend_argument_type_error(1, "must be a valid callback, function \"%s\" not found", Z_STRVAL_P(function_name));
1148+
zend_argument_type_error(1, "must be a valid function name, function \"%s\" not found", Z_STRVAL_P(function_name));
11491149
RETURN_THROWS();
11501150
}
11511151
if (service->soap_functions.ft == NULL) {
@@ -1168,6 +1168,9 @@ PHP_METHOD(SoapServer, addFunction)
11681168
zend_argument_value_error(1, "must be SOAP_FUNCTIONS_ALL when an integer is passed");
11691169
RETURN_THROWS();
11701170
}
1171+
} else {
1172+
zend_argument_type_error(1, "must be of type array|string|int, %s given", zend_zval_type_name(function_name));
1173+
RETURN_THROWS();
11711174
}
11721175

11731176
SOAP_SERVER_END_CODE();

0 commit comments

Comments
 (0)