[PHP-CVS] [php-src] master: soap: call_user_function API doesn't care about the function table (#22941)
[email protected] (Gina Peter Banyard via GitHub)
| Newsgroups | php.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Gina Peter Banyard (Girgias)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-08-14T16:13:07+01:00
Commit: https://github.com/php/php-src/commit/9f92639ade053f033587e90e6964390f99f4738f
Raw diff: https://github.com/php/php-src/commit/9f92639ade053f033587e90e6964390f99f4738f.diff
soap: call_user_function API doesn't care about the function table (#22941)
Changed paths:
M ext/soap/soap.c
Diff:
diff --git a/ext/soap/soap.c b/ext/soap/soap.c
index 4fade198d020..402708bb3095 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));