Skip to content

Commit 40ba9f6

Browse files
committed
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.
1 parent cff35ca commit 40ba9f6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ext/soap/soap.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2215,11 +2215,7 @@ static int do_request(zval *this_ptr, xmlDoc *request, char *location, char *act
22152215

22162216
ZVAL_STRINGL(&func,"__doRequest",sizeof("__doRequest")-1);
22172217
ZVAL_STRINGL(&params[0], buf, buf_size);
2218-
if (location == NULL) {
2219-
ZVAL_NULL(&params[1]);
2220-
} else {
2221-
ZVAL_STRING(&params[1], location);
2222-
}
2218+
ZVAL_STRING(&params[1], location);
22232219
if (action == NULL) {
22242220
ZVAL_NULL(&params[2]);
22252221
} else {
@@ -2371,6 +2367,7 @@ static void do_soap_call(zend_execute_data *execute_data,
23712367

23722368
if (location == NULL) {
23732369
location = binding->location;
2370+
ZEND_ASSERT(location);
23742371
}
23752372
if (binding->bindingType == BINDING_SOAP) {
23762373
sdlSoapBindingFunctionPtr fnb = (sdlSoapBindingFunctionPtr)fn->bindingAttributes;

0 commit comments

Comments
 (0)