@@ -952,9 +952,10 @@ static PHP_FUNCTION(libxml_set_streams_context)
952
952
{
953
953
zval * arg ;
954
954
955
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "r" , & arg ) == FAILURE ) {
956
- return ;
957
- }
955
+ ZEND_PARSE_PARAMETERS_START (1 , 1 )
956
+ Z_PARAM_RESOURCE (arg )
957
+ ZEND_PARSE_PARAMETERS_END ();
958
+
958
959
if (!Z_ISUNDEF (LIBXML (stream_context ))) {
959
960
zval_ptr_dtor (& LIBXML (stream_context ));
960
961
ZVAL_UNDEF (& LIBXML (stream_context ));
@@ -970,9 +971,10 @@ static PHP_FUNCTION(libxml_use_internal_errors)
970
971
xmlStructuredErrorFunc current_handler ;
971
972
zend_bool use_errors = 0 , retval ;
972
973
973
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "|b" , & use_errors ) == FAILURE ) {
974
- return ;
975
- }
974
+ ZEND_PARSE_PARAMETERS_START (0 , 1 )
975
+ Z_PARAM_OPTIONAL
976
+ Z_PARAM_BOOL (use_errors )
977
+ ZEND_PARSE_PARAMETERS_END ();
976
978
977
979
current_handler = xmlStructuredError ;
978
980
if (current_handler && current_handler == php_libxml_structured_error_handler ) {
@@ -1099,9 +1101,10 @@ static PHP_FUNCTION(libxml_disable_entity_loader)
1099
1101
{
1100
1102
zend_bool disable = 1 ;
1101
1103
1102
- if (zend_parse_parameters (ZEND_NUM_ARGS (), "|b" , & disable ) == FAILURE ) {
1103
- return ;
1104
- }
1104
+ ZEND_PARSE_PARAMETERS_START (0 , 1 )
1105
+ Z_PARAM_OPTIONAL
1106
+ Z_PARAM_BOOL (disable )
1107
+ ZEND_PARSE_PARAMETERS_END ();
1105
1108
1106
1109
RETURN_BOOL (php_libxml_disable_entity_loader (disable ));
1107
1110
}
@@ -1113,10 +1116,10 @@ static PHP_FUNCTION(libxml_set_external_entity_loader)
1113
1116
{
1114
1117
zend_fcall_info fci ;
1115
1118
zend_fcall_info_cache fcc ;
1116
- if ( zend_parse_parameters ( ZEND_NUM_ARGS (), "f!" , & fci , & fcc )
1117
- == FAILURE ) {
1118
- return ;
1119
- }
1119
+
1120
+ ZEND_PARSE_PARAMETERS_START ( 1 , 1 )
1121
+ Z_PARAM_FUNC_EX ( fci , fcc , 1 , 0 )
1122
+ ZEND_PARSE_PARAMETERS_END ();
1120
1123
1121
1124
_php_libxml_destroy_fci (& LIBXML (entity_loader ).fci , & LIBXML (entity_loader ).object );
1122
1125
0 commit comments