summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-02-10 11:18:20 +0100
committerNikita Popov <nikita.ppv@gmail.com>2021-02-10 11:18:20 +0100
commit40ba9f6a1ae5bf2776a580c6cf612402f8e3c04d (patch)
treef520222c1a77d9e1f4406705dffe6420dd50ca07
parentcff35ca0b2c2f8d795eefec178c1ef4b316bd4f0 (diff)
downloadphp-git-40ba9f6a1ae5bf2776a580c6cf612402f8e3c04d.tar.gz
Clarify that location is required in do_request
As far as I can tell, the location is always non-null here, and the code wouldn't be able to meaningfully work without a location.
-rw-r--r--ext/soap/soap.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 3334689ed9..3d76c0fc70 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -2215,11 +2215,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
ZVAL_STRINGL(&func,"__doRequest",sizeof("__doRequest")-1);
ZVAL_STRINGL(&params[0], buf, buf_size);
- if (location == NULL) {
- ZVAL_NULL(&params[1]);
- } else {
- ZVAL_STRING(&params[1], location);
- }
+ ZVAL_STRING(&params[1], location);
if (action == NULL) {
ZVAL_NULL(&params[2]);
} else {
@@ -2371,6 +2367,7 @@ static void do_soap_call(zend_execute_data *execute_data,
if (location == NULL) {
location = binding->location;
+ ZEND_ASSERT(location);
}
if (binding->bindingType == BINDING_SOAP) {
sdlSoapBindingFunctionPtr fnb = (sdlSoapBindingFunctionPtr)fn->bindingAttributes;