diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index efccf0a4078..763726e3b36 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -1003,6 +1003,10 @@ static PHP_FUNCTION(libxml_get_last_error) { xmlErrorPtr error; + if (zend_parse_parameters_none() == FAILURE) { + return; + } + error = xmlGetLastError(); if (error) { @@ -1034,6 +1038,10 @@ static PHP_FUNCTION(libxml_get_errors) xmlErrorPtr error; + if (zend_parse_parameters_none() == FAILURE) { + return; + } + if (LIBXML(error_list)) { array_init(return_value); @@ -1071,6 +1079,10 @@ static PHP_FUNCTION(libxml_get_errors) Clear last error from libxml */ static PHP_FUNCTION(libxml_clear_errors) { + if (zend_parse_parameters_none() == FAILURE) { + return; + } + xmlResetLastError(); if (LIBXML(error_list)) { zend_llist_clean(LIBXML(error_list));