Skip to content

Commit ae13fe0

Browse files
committed
restructure to get rid of goto
1 parent b13f8c0 commit ae13fe0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

ext/soap/soap.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,19 +1547,18 @@ PHP_METHOD(SoapServer, handle)
15471547
}
15481548
#endif
15491549
zend_function *header_fn = zend_hash_find_ptr_lc(function_table, Z_STR(h->function_name));
1550+
/* If object has a __call() magic method use it */
1551+
if (header_fn == NULL && soap_obj_ce && soap_obj_ce->__call) {
1552+
header_fn = zend_get_call_trampoline_func(soap_obj_ce, Z_STR(function_name), false);
1553+
}
15501554
if (UNEXPECTED(header_fn == NULL)) {
1551-
if (soap_obj_ce && soap_obj_ce->__call) {
1552-
header_fn = zend_get_call_trampoline_func(soap_obj_ce, Z_STR(function_name), false);
1553-
goto soap_header_func_call;
1554-
}
15551555
if (h->mustUnderstand) {
15561556
soap_server_fault_en("MustUnderstand","Header not understood", NULL, NULL, NULL);
15571557
goto fail;
15581558
}
15591559
continue;
15601560
}
15611561

1562-
soap_header_func_call:
15631562
zend_call_known_function(header_fn, soap_zobj, soap_obj_ce, &h->retval, h->num_params, h->parameters, NULL);
15641563
if (Z_TYPE(h->retval) == IS_OBJECT &&
15651564
instanceof_function(Z_OBJCE(h->retval), soap_fault_class_entry)) {

0 commit comments

Comments
 (0)