@@ -50,10 +50,12 @@ static void type_to_string(sdlTypePtr type, smart_str *buf, int level);
50
50
51
51
static void clear_soap_fault (zval * obj );
52
52
static void set_soap_fault (zval * obj , const char * fault_code_ns , const char * fault_code , const char * fault_string , const char * fault_actor , zval * fault_detail , zend_string * name , zend_string * lang );
53
+ static void add_soap_fault_en (zval * obj , char * fault_code , char * fault_string , char * fault_actor , zval * fault_detail );
53
54
static void add_soap_fault_ex (zval * fault , zval * obj , char * fault_code , char * fault_string , char * fault_actor , zval * fault_detail , zend_string * lang );
55
+ static void add_soap_fault_ex_en (zval * fault , zval * obj , char * fault_code , char * fault_string , char * fault_actor , zval * fault_detail );
54
56
static ZEND_NORETURN void soap_server_fault (char * code , char * string , char * actor , zval * details , zend_string * name , zend_string * lang );
55
- static ZEND_NORETURN void soap_server_fault_en (char * code , char * string , char * actor , zval * details , zend_string * name );
56
57
static void soap_server_fault_ex (sdlFunctionPtr function , zval * fault , soapHeader * hdr );
58
+ static ZEND_NORETURN void soap_server_fault_en (char * code , char * string , char * actor , zval * details , zend_string * name );
57
59
58
60
static sdlParamPtr get_param (sdlFunctionPtr function , const char * param_name , zend_ulong index , int );
59
61
static sdlFunctionPtr get_function (sdlPtr sdl , const char * function_name , size_t function_name_length );
@@ -1254,10 +1256,10 @@ static void _soap_server_exception(soapServicePtr service, sdlFunctionPtr functi
1254
1256
if (service -> send_errors ) {
1255
1257
zval rv ;
1256
1258
zend_string * msg = zval_get_string (zend_read_property_ex (zend_ce_error , Z_OBJ (exception_object ), ZSTR_KNOWN (ZEND_STR_MESSAGE ), /* silent */ false, & rv ));
1257
- add_soap_fault_ex (& exception_object , this_ptr , "Server" , ZSTR_VAL (msg ), NULL , NULL , SOAP_GLOBAL ( lang_en ) );
1259
+ add_soap_fault_ex_en (& exception_object , this_ptr , "Server" , ZSTR_VAL (msg ), NULL , NULL );
1258
1260
zend_string_release_ex (msg , 0 );
1259
1261
} else {
1260
- add_soap_fault_ex (& exception_object , this_ptr , "Server" , "Internal Error" , NULL , NULL , SOAP_GLOBAL ( lang_en ) );
1262
+ add_soap_fault_ex_en (& exception_object , this_ptr , "Server" , "Internal Error" , NULL , NULL );
1261
1263
}
1262
1264
soap_server_fault_ex (function , & exception_object , NULL );
1263
1265
}
@@ -1876,7 +1878,7 @@ static zend_never_inline ZEND_COLD void soap_real_error_handler(int error_num, z
1876
1878
code = "Client" ;
1877
1879
}
1878
1880
1879
- add_soap_fault_ex (& fault , & SOAP_GLOBAL (error_object ), code , ZSTR_VAL (message ), NULL , NULL , SOAP_GLOBAL ( lang_en ) );
1881
+ add_soap_fault_ex_en (& fault , & SOAP_GLOBAL (error_object ), code , ZSTR_VAL (message ), NULL , NULL );
1880
1882
Z_ADDREF (fault );
1881
1883
zend_throw_exception_object (& fault );
1882
1884
zend_bailout ();
@@ -2230,7 +2232,7 @@ static bool do_request(zval *this_ptr, xmlDoc *request, const char *location, co
2230
2232
2231
2233
xmlDocDumpMemory (request , (xmlChar * * )& buf , & buf_size );
2232
2234
if (!buf ) {
2233
- add_soap_fault (this_ptr , "HTTP" , "Error build soap request" , NULL , NULL , SOAP_GLOBAL ( lang_en ) );
2235
+ add_soap_fault_en (this_ptr , "HTTP" , "Error build soap request" , NULL , NULL );
2234
2236
return false;
2235
2237
}
2236
2238
@@ -2260,7 +2262,7 @@ static bool do_request(zval *this_ptr, xmlDoc *request, const char *location, co
2260
2262
if (EG (exception ) && instanceof_function (EG (exception )-> ce , zend_ce_error )) {
2261
2263
/* Programmer error in __doRequest() implementation, let it bubble up. */
2262
2264
} else if (Z_TYPE_P (Z_CLIENT_SOAP_FAULT_P (this_ptr )) != IS_OBJECT ) {
2263
- add_soap_fault (this_ptr , "Client" , "SoapClient::__doRequest() returned non string value" , NULL , NULL , SOAP_GLOBAL ( lang_en ) );
2265
+ add_soap_fault_en (this_ptr , "Client" , "SoapClient::__doRequest() returned non string value" , NULL , NULL );
2264
2266
}
2265
2267
ret = false;
2266
2268
} else if (Z_TYPE_P (trace ) == IS_TRUE ) {
@@ -2420,15 +2422,15 @@ static void do_soap_call(zend_execute_data *execute_data,
2420
2422
smart_str_append (& error ,function );
2421
2423
smart_str_appends (& error ,"\") is not a valid method for this service" );
2422
2424
smart_str_0 (& error );
2423
- add_soap_fault (this_ptr , "Client" , ZSTR_VAL (error .s ), NULL , NULL , SOAP_GLOBAL ( lang_en ) );
2425
+ add_soap_fault_en (this_ptr , "Client" , ZSTR_VAL (error .s ), NULL , NULL );
2424
2426
smart_str_free (& error );
2425
2427
}
2426
2428
} else {
2427
2429
zval * uri = Z_CLIENT_URI_P (this_ptr );
2428
2430
if (Z_TYPE_P (uri ) != IS_STRING ) {
2429
- add_soap_fault (this_ptr , "Client" , "Error finding \"uri\" property" , NULL , NULL , SOAP_GLOBAL ( lang_en ) );
2431
+ add_soap_fault_en (this_ptr , "Client" , "Error finding \"uri\" property" , NULL , NULL );
2430
2432
} else if (location == NULL ) {
2431
- add_soap_fault (this_ptr , "Client" , "Error could not find \"location\" property" , NULL , NULL , SOAP_GLOBAL ( lang_en ) );
2433
+ add_soap_fault_en (this_ptr , "Client" , "Error could not find \"location\" property" , NULL , NULL );
2432
2434
} else {
2433
2435
if (call_uri == NULL ) {
2434
2436
call_uri = Z_STR_P (uri );
@@ -2465,7 +2467,7 @@ static void do_soap_call(zend_execute_data *execute_data,
2465
2467
if (Z_TYPE_P (fault ) == IS_OBJECT ) {
2466
2468
ZVAL_COPY (return_value , fault );
2467
2469
} else {
2468
- add_soap_fault_ex (return_value , this_ptr , "Client" , "Unknown Error" , NULL , NULL , SOAP_GLOBAL ( lang_en ) );
2470
+ add_soap_fault_ex_en (return_value , this_ptr , "Client" , "Unknown Error" , NULL , NULL );
2469
2471
Z_ADDREF_P (return_value );
2470
2472
}
2471
2473
} else {
@@ -2930,13 +2932,23 @@ static void add_soap_fault_ex(zval *fault, zval *obj, char *fault_code, char *fa
2930
2932
}
2931
2933
/* }}} */
2932
2934
2935
+ static void add_soap_fault_ex_en (zval * fault , zval * obj , char * fault_code , char * fault_string , char * fault_actor , zval * fault_detail )
2936
+ {
2937
+ add_soap_fault_ex (fault , obj , fault_code , fault_string , fault_actor , fault_detail , SOAP_GLOBAL (lang_en ));
2938
+ }
2939
+
2933
2940
void add_soap_fault (zval * obj , char * fault_code , char * fault_string , char * fault_actor , zval * fault_detail , zend_string * lang ) /* {{{ */
2934
2941
{
2935
2942
zval fault ;
2936
2943
add_soap_fault_ex (& fault , obj , fault_code , fault_string , fault_actor , fault_detail , lang );
2937
2944
}
2938
2945
/* }}} */
2939
2946
2947
+ static void add_soap_fault_en (zval * obj , char * fault_code , char * fault_string , char * fault_actor , zval * fault_detail )
2948
+ {
2949
+ add_soap_fault (obj , fault_code , fault_string , fault_actor , fault_detail , SOAP_GLOBAL (lang_en ));
2950
+ }
2951
+
2940
2952
static void set_soap_fault (zval * obj , const char * fault_code_ns , const char * fault_code , const char * fault_string , const char * fault_actor , zval * fault_detail , zend_string * name , zend_string * lang ) /* {{{ */
2941
2953
{
2942
2954
if (Z_TYPE_P (obj ) != IS_OBJECT ) {
0 commit comments