summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schneider2024-06-25 17:25:24 +0200
committerChristian Schneider2024-06-25 17:25:24 +0200
commitfcb0d6a5b0d9855c21e71192cfb5fca4c20e098e (patch)
tree33558e7d0bec832e89630f97a437e56ad3767d48
parentf38fc0c9781d3ade51acead3db60fc4323e9f0df (diff)
downloaditools-fcb0d6a5b0d9855c21e71192cfb5fca4c20e098e.tar.gz
itools-fcb0d6a5b0d9855c21e71192cfb5fca4c20e098e.tar.bz2
itools-fcb0d6a5b0d9855c21e71192cfb5fca4c20e098e.zip
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
-rw-r--r--it_xml.class5
1 files 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']);