From fcb0d6a5b0d9855c21e71192cfb5fca4c20e098e Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Tue, 25 Jun 2024 17:25:24 +0200 Subject: Replace xml_set_object/xml_set_* with [$this, "methodName"] equivalent as it might get deprecated: https://wiki.php.net/rfc/deprecations_php_8_4#xml_set_object_and_xml_set_handler_with_string_method_names --- it_xml.class | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/it_xml.class b/it_xml.class index 7765054..f74f743 100644 --- a/it_xml.class +++ b/it_xml.class @@ -61,9 +61,8 @@ function from_xml($xmldata, $p) $this->_stack = array(); unset($this->error); $parser = xml_parser_create(); - xml_set_object($parser, $this); - xml_set_element_handler($parser, "start_element", "end_element"); - xml_set_character_data_handler($parser, "character_data"); + xml_set_element_handler($parser, [$this, "start_element"], [$this, "end_element"]); + xml_set_character_data_handler($parser, [$this, "character_data"]); xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, $this->_p['encoding']); -- cgit v1.2.3