diff --git a/ext/soap/soap.c b/ext/soap/soap.c index 72807ce1956..5570dec5f8b 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2886,7 +2886,7 @@ PHP_METHOD(SoapClient, __setLocation) zval *tmp; zval *this_ptr = ZEND_THIS; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s", &location, &location_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|s!", &location, &location_len) == FAILURE) { RETURN_THROWS(); } diff --git a/ext/soap/soap.stub.php b/ext/soap/soap.stub.php index 298374e8663..01e41b7e879 100644 --- a/ext/soap/soap.stub.php +++ b/ext/soap/soap.stub.php @@ -108,5 +108,5 @@ class SoapClient public function __setSoapHeaders($headers = null) {} /** @return string|null */ - public function __setLocation(string $location = "") {} + public function __setLocation(?string $location = null) {} }