@@ -688,10 +688,12 @@ PHP_FUNCTION(xmlrpc_encode_request)
688
688
{
689
689
XMLRPC_REQUEST xRequest = NULL ;
690
690
char * outBuf ;
691
- zval * * method , * * vals , * out_opts = NULL ;
691
+ zval * vals , * out_opts = NULL ;
692
+ char * method = NULL ;
693
+ int method_len ;
692
694
php_output_options out ;
693
695
694
- if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "ZZ |a" , & method , & vals , & out_opts ) == FAILURE ) {
696
+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "s!z |a" , & method , & method_len , & vals , & out_opts ) == FAILURE ) {
695
697
return ;
696
698
}
697
699
@@ -702,15 +704,14 @@ PHP_FUNCTION(xmlrpc_encode_request)
702
704
703
705
if (xRequest ) {
704
706
XMLRPC_RequestSetOutputOptions (xRequest , & out .xmlrpc_out );
705
- if (Z_TYPE_PP ( method ) == IS_NULL ) {
707
+ if (method == NULL ) {
706
708
XMLRPC_RequestSetRequestType (xRequest , xmlrpc_request_response );
707
709
} else {
708
- convert_to_string_ex (method );
709
- XMLRPC_RequestSetMethodName (xRequest , Z_STRVAL_PP (method ));
710
+ XMLRPC_RequestSetMethodName (xRequest , method );
710
711
XMLRPC_RequestSetRequestType (xRequest , xmlrpc_request_call );
711
712
}
712
- if (Z_TYPE_PP (vals ) != IS_NULL ) {
713
- XMLRPC_RequestSetData (xRequest , PHP_to_XMLRPC (* vals TSRMLS_CC ));
713
+ if (Z_TYPE_P (vals ) != IS_NULL ) {
714
+ XMLRPC_RequestSetData (xRequest , PHP_to_XMLRPC (vals TSRMLS_CC ));
714
715
}
715
716
716
717
outBuf = XMLRPC_REQUEST_ToXML (xRequest , 0 );
@@ -800,7 +801,6 @@ PHP_FUNCTION(xmlrpc_decode_request)
800
801
return ;
801
802
}
802
803
803
- convert_to_string_ex (method );
804
804
805
805
if (return_value_used ) {
806
806
zval * retval = decode_request_worker (xml , xml_len , encoding_len ? encoding : NULL , * method );
@@ -1061,20 +1061,20 @@ PHP_FUNCTION(xmlrpc_server_call_method)
1061
1061
XMLRPC_REQUEST xRequest ;
1062
1062
STRUCT_XMLRPC_REQUEST_INPUT_OPTIONS input_opts ;
1063
1063
xmlrpc_server_data * server ;
1064
- zval * * caller_params , * handle , * * output_opts = NULL ;
1064
+ zval * * caller_params , * handle , * output_opts = NULL ;
1065
1065
char * rawxml ;
1066
1066
int rawxml_len , type ;
1067
1067
php_output_options out ;
1068
1068
int argc = ZEND_NUM_ARGS ();
1069
1069
1070
- if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "rsZ|Z " , & handle , & rawxml , & rawxml_len , & caller_params , & output_opts ) != SUCCESS ) {
1070
+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "rsZ|a " , & handle , & rawxml , & rawxml_len , & caller_params , & output_opts ) != SUCCESS ) {
1071
1071
return ;
1072
1072
}
1073
1073
/* user output options */
1074
1074
if (argc == 3 ) {
1075
1075
set_output_options (& out , NULL );
1076
1076
} else {
1077
- set_output_options (& out , * output_opts );
1077
+ set_output_options (& out , output_opts );
1078
1078
}
1079
1079
1080
1080
server = zend_list_find (Z_LVAL_P (handle ), & type );
0 commit comments