Commit 9f92639ade0 for php.net

commit 9f92639ade053f033587e90e6964390f99f4738f
Author: Gina Peter Banyard <girgias@php.net>
Date:   Fri Aug 14 16:13:07 2026 +0100

    soap: call_user_function API doesn't care about the function table (#22941)

diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 4fade198d02..402708bb309 100644
--- a/ext/soap/soap.c
+++ b/ext/soap/soap.c
@@ -1643,11 +1643,7 @@ PHP_METHOD(SoapServer, handle)
 			if (zend_hash_find_ptr_lc(function_table, Z_STR(h->function_name)) != NULL ||
 			    ((service->type == SOAP_CLASS || service->type == SOAP_OBJECT) &&
 			     zend_hash_str_exists(function_table, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)-1))) {
-				if (service->type == SOAP_CLASS || service->type == SOAP_OBJECT) {
-					call_status = call_user_function(NULL, soap_obj, &h->function_name, &h->retval, h->num_params, h->parameters);
-				} else {
-					call_status = call_user_function(EG(function_table), NULL, &h->function_name, &h->retval, h->num_params, h->parameters);
-				}
+				call_status = call_user_function(NULL, soap_obj, &h->function_name, &h->retval, h->num_params, h->parameters);
 				if (call_status != SUCCESS) {
 					php_error_docref(NULL, E_WARNING, "Function '%s' call failed", Z_STRVAL(h->function_name));
 					return;
@@ -1681,16 +1677,12 @@ PHP_METHOD(SoapServer, handle)
 	if (zend_hash_find_ptr_lc(function_table, Z_STR(function_name)) != NULL ||
 	    ((service->type == SOAP_CLASS || service->type == SOAP_OBJECT) &&
 	     zend_hash_str_exists(function_table, ZEND_CALL_FUNC_NAME, sizeof(ZEND_CALL_FUNC_NAME)-1))) {
-		if (service->type == SOAP_CLASS || service->type == SOAP_OBJECT) {
-			call_status = call_user_function(NULL, soap_obj, &function_name, &retval, num_params, params);
-			if (service->type == SOAP_CLASS) {
-				if (service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
-					zval_ptr_dtor(soap_obj);
-					soap_obj = NULL;
-				}
+		call_status = call_user_function(NULL, soap_obj, &function_name, &retval, num_params, params);
+		if (service->type == SOAP_CLASS) {
+			if (service->soap_class.persistence != SOAP_PERSISTENCE_SESSION) {
+				zval_ptr_dtor(soap_obj);
+				soap_obj = NULL;
 			}
-		} else {
-			call_status = call_user_function(EG(function_table), NULL, &function_name, &retval, num_params, params);
 		}
 	} else {
 		php_error(E_ERROR, "Function '%s' doesn't exist", Z_STRVAL(function_name));