@@ -1111,8 +1111,8 @@ PHP_FUNCTION(xml_set_element_handler)
1111
1111
zend_fcall_info_cache start_fcc = {0 };
1112
1112
zend_fcall_info end_fci = {0 };
1113
1113
zend_fcall_info_cache end_fcc = {0 };
1114
- zend_string * method_name = NULL ;
1115
- zend_string * method_name2 = NULL ;
1114
+ zend_string * start_method_name = NULL ;
1115
+ zend_string * end_method_name = NULL ;
1116
1116
1117
1117
// TODO: cover trampolines with tests, as the !ZEND_FCC_INITIALIZED branches are never executed right now
1118
1118
if (zend_parse_parameters_ex (ZEND_PARSE_PARAMS_QUIET , ZEND_NUM_ARGS (), "Of!f!" , & pind , xml_parser_ce , & start_fci , & start_fcc , & end_fci , & end_fcc ) == SUCCESS ) {
@@ -1129,10 +1129,10 @@ PHP_FUNCTION(xml_set_element_handler)
1129
1129
* with it ourselves. It is important that it is not refetched on every call,
1130
1130
* because calls may occur from different scopes. */
1131
1131
}
1132
- } else if (zend_parse_parameters_ex (ZEND_PARSE_PARAMS_QUIET , ZEND_NUM_ARGS (), "Of!S" , & pind , xml_parser_ce , & start_fci , & start_fcc , & method_name ) == SUCCESS ) {
1132
+ } else if (zend_parse_parameters_ex (ZEND_PARSE_PARAMS_QUIET , ZEND_NUM_ARGS (), "Of!S" , & pind , xml_parser_ce , & start_fci , & start_fcc , & end_method_name ) == SUCCESS ) {
1133
1133
parser = Z_XMLPARSER_P (pind );
1134
1134
1135
- bool status = php_xml_check_string_method_arg (3 , parser , method_name , & start_fcc );
1135
+ bool status = php_xml_check_string_method_arg (3 , parser , end_method_name , & start_fcc );
1136
1136
if (status == false) {
1137
1137
RETURN_FALSE ;
1138
1138
}
@@ -1143,10 +1143,10 @@ PHP_FUNCTION(xml_set_element_handler)
1143
1143
* with it ourselves. It is important that it is not refetched on every call,
1144
1144
* because calls may occur from different scopes. */
1145
1145
}
1146
- } else if (zend_parse_parameters_ex (ZEND_PARSE_PARAMS_QUIET , ZEND_NUM_ARGS (), "OSf!" , & pind , xml_parser_ce , & method_name , & end_fci , & end_fcc ) == SUCCESS ) {
1146
+ } else if (zend_parse_parameters_ex (ZEND_PARSE_PARAMS_QUIET , ZEND_NUM_ARGS (), "OSf!" , & pind , xml_parser_ce , & start_method_name , & end_fci , & end_fcc ) == SUCCESS ) {
1147
1147
parser = Z_XMLPARSER_P (pind );
1148
1148
1149
- bool status = php_xml_check_string_method_arg (2 , parser , method_name , & start_fcc );
1149
+ bool status = php_xml_check_string_method_arg (2 , parser , start_method_name , & start_fcc );
1150
1150
if (status == false) {
1151
1151
RETURN_FALSE ;
1152
1152
}
@@ -1157,15 +1157,15 @@ PHP_FUNCTION(xml_set_element_handler)
1157
1157
* with it ourselves. It is important that it is not refetched on every call,
1158
1158
* because calls may occur from different scopes. */
1159
1159
}
1160
- } else if (zend_parse_parameters_ex (ZEND_PARSE_PARAMS_QUIET , ZEND_NUM_ARGS (), "OSS" , & pind , xml_parser_ce , & method_name , & method_name2 ) == SUCCESS ) {
1160
+ } else if (zend_parse_parameters_ex (ZEND_PARSE_PARAMS_QUIET , ZEND_NUM_ARGS (), "OSS" , & pind , xml_parser_ce , & start_method_name , & end_method_name ) == SUCCESS ) {
1161
1161
parser = Z_XMLPARSER_P (pind );
1162
1162
1163
- bool status = php_xml_check_string_method_arg (2 , parser , method_name , & start_fcc );
1163
+ bool status = php_xml_check_string_method_arg (2 , parser , start_method_name , & start_fcc );
1164
1164
if (status == false) {
1165
1165
RETURN_FALSE ;
1166
1166
}
1167
- bool status2 = php_xml_check_string_method_arg (3 , parser , method_name2 , & end_fcc );
1168
- if (status2 == false) {
1167
+ status = php_xml_check_string_method_arg (3 , parser , end_method_name , & end_fcc );
1168
+ if (status == false) {
1169
1169
RETURN_FALSE ;
1170
1170
}
1171
1171
} else {
@@ -1219,10 +1219,9 @@ static void php_xml_set_handler_parse_callable(
1219
1219
}
1220
1220
memcpy (parser_handler_fcc , & handler_fcc , sizeof (zend_fcall_info_cache ));
1221
1221
} else if (zend_parse_parameters_ex (ZEND_PARSE_PARAMS_QUIET , ZEND_NUM_ARGS (), "OS" , & pind , xml_parser_ce , & method_name ) == SUCCESS ) {
1222
- xml_parser * local_parser ;
1223
- * parser = local_parser = Z_XMLPARSER_P (pind );
1222
+ * parser = Z_XMLPARSER_P (pind );
1224
1223
1225
- bool status = php_xml_check_string_method_arg (2 , local_parser , method_name , parser_handler_fcc );
1224
+ bool status = php_xml_check_string_method_arg (2 , * parser , method_name , parser_handler_fcc );
1226
1225
if (status == false) {
1227
1226
RETURN_FALSE ;
1228
1227
}
0 commit comments