diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 60a4ca5cc97..861d8ebf5d3 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2188,7 +2188,7 @@ PHP_METHOD(SoapClient, __construct) } /* }}} */ -static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *action, int version, int one_way, zval *response) /* {{{ */ +static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *action, int version, zend_bool one_way, zval *response) /* {{{ */ { int ret = TRUE; char *buf; @@ -2226,7 +2226,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act ZVAL_STRING(¶ms[2], action); } ZVAL_LONG(¶ms[3], version); - ZVAL_LONG(¶ms[4], one_way); + ZVAL_BOOL(¶ms[4], one_way); if (call_user_function(NULL, this_ptr, &func, response, 5, params) != SUCCESS) { add_soap_fault(this_ptr, "Client", "SoapClient::__doRequest() failed", NULL, NULL); @@ -2361,7 +2361,7 @@ static void do_soap_call(zend_execute_data *execute_data, fn = get_function(sdl, function); if (fn != NULL) { sdlBindingPtr binding = fn->binding; - int one_way = 0; + zend_bool one_way = 0; if (fn->responseName == NULL && fn->responseParameters == NULL && @@ -2758,10 +2758,10 @@ PHP_METHOD(SoapClient, __doRequest) char *location, *action; size_t location_size, action_size; zend_long version; - zend_long one_way = 0; + zend_bool one_way = 0; zval *this_ptr = ZEND_THIS; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sssl|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sssl|b", &buf, &location, &location_size, &action, &action_size, diff --git a/ext/soap/soap.stub.php b/ext/soap/soap.stub.php index acbbe2a6fa1..0709c6092ef 100644 --- a/ext/soap/soap.stub.php +++ b/ext/soap/soap.stub.php @@ -93,7 +93,7 @@ class SoapClient public function __getLastResponseHeaders() {} /** @return string|null */ - public function __doRequest(string $request, string $location, string $action, int $version, int $one_way = 0) {} + public function __doRequest(string $request, string $location, string $action, int $version, bool $one_way = false) {} /** @return void */ public function __setCookie(string $name, ?string $value = null) {} diff --git a/ext/soap/soap_arginfo.h b/ext/soap/soap_arginfo.h index 03b559d4fcb..d6153c4812b 100644 --- a/ext/soap/soap_arginfo.h +++ b/ext/soap/soap_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: b33d57ddba20c64739d51bfba39f2557026939cd */ + * Stub hash: 6cba3704e7a71fa22031734207365dd88764ddb2 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_use_soap_error_handler, 0, 0, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, handler, _IS_BOOL, 0, "true") @@ -116,7 +116,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___doRequest, 0, 0, 4) ZEND_ARG_TYPE_INFO(0, location, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, action, IS_STRING, 0) ZEND_ARG_TYPE_INFO(0, version, IS_LONG, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, one_way, IS_LONG, 0, "0") + ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, one_way, _IS_BOOL, 0, "false") ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_class_SoapClient___setCookie, 0, 0, 1) diff --git a/ext/soap/tests/bugs/bug54911.phpt b/ext/soap/tests/bugs/bug54911.phpt index ef7ca1fc427..a974c22901b 100644 --- a/ext/soap/tests/bugs/bug54911.phpt +++ b/ext/soap/tests/bugs/bug54911.phpt @@ -15,7 +15,7 @@ Bug #54911 (Access to a undefined member in inherit SoapClient may cause Segment --EXPECTF-- Fatal error: Uncaught SoapFault exception: [Client] Access to undeclared static property XSoapClient::$crash in %sbug54911.php:4 Stack trace: -#0 [internal function]: XSoapClient->__doRequest('__doRequest('__soapCall('', Array) #2 {main} thrown in %sbug54911.php on line 4