From 84dea43914f1c9345201fe731c63e0c47b301fa9 Mon Sep 17 00:00:00 2001 From: George Peter Banyard Date: Sat, 7 Oct 2023 13:47:13 +0100 Subject: [PATCH] Drop usage of xml_set_object() And use normal callables instead of ext/xml's strange feature --- engine/Library/Zend/Translate/Adapter/XmlTm.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/engine/Library/Zend/Translate/Adapter/XmlTm.php b/engine/Library/Zend/Translate/Adapter/XmlTm.php index 9a3ff7fcb55..4b808105a03 100644 --- a/engine/Library/Zend/Translate/Adapter/XmlTm.php +++ b/engine/Library/Zend/Translate/Adapter/XmlTm.php @@ -60,10 +60,9 @@ protected function _loadTranslationData($filename, $locale, array $options = arr $encoding = $this->_findEncoding($filename); $this->_file = xml_parser_create($encoding); - xml_set_object($this->_file, $this); xml_parser_set_option($this->_file, XML_OPTION_CASE_FOLDING, 0); - xml_set_element_handler($this->_file, "_startElement", "_endElement"); - xml_set_character_data_handler($this->_file, "_contentElement"); + xml_set_element_handler($this->_file, [$this, "_startElement"], [$this, "_endElement"]); + xml_set_character_data_handler($this->_file, [$this, "_contentElement"]); if (!xml_parse($this->_file, file_get_contents($filename))) { $ex = sprintf('XML error: %s at line %d of file %s',