From 40ba9f6a1ae5bf2776a580c6cf612402f8e3c04d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 10 Feb 2021 11:18:20 +0100 Subject: [PATCH] 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. --- ext/soap/soap.c | 7 ++----- 1 file 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(¶ms[0], buf, buf_size); - if (location == NULL) { - ZVAL_NULL(¶ms[1]); - } else { - ZVAL_STRING(¶ms[1], location); - } + ZVAL_STRING(¶ms[1], location); if (action == NULL) { ZVAL_NULL(¶ms[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; -- 2.40.0