MDL-83336 core: Update for deprecation of xml_set_object

From PHP 8.4, `xml_set_object()`, and passing a string helper to
`xml_set_.*_handler()` has been deprecated.

This commit updates all uses of these in core code.

Please note the following libraries have not been modified and will be
handled via library upgrades separately:
- simplepie
- phpxmlrpc
- tcpdf
This commit is contained in:
Andrew Nicols
2024-10-09 15:02:37 +08:00
parent 67f5ee3cec
commit d9863dbc94
5 changed files with 14 additions and 21 deletions
@@ -79,7 +79,6 @@ class progressive_parser {
public function __construct($case_folding = false) {
$this->xml_parser = xml_parser_create('UTF-8');
xml_parser_set_option($this->xml_parser, XML_OPTION_CASE_FOLDING, $case_folding);
xml_set_object($this->xml_parser, $this);
xml_set_element_handler($this->xml_parser, array($this, 'start_tag'), array($this, 'end_tag'));
xml_set_character_data_handler($this->xml_parser, array($this, 'char_data'));