From 79fd50e172a50918d9018f54ab6e40606181f95b Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Tue, 15 Sep 2020 13:20:03 +0200 Subject: Make itools PHP 8 compatible --- it_xml.class | 3 +++ 1 file changed, 3 insertions(+) (limited to 'it_xml.class') diff --git a/it_xml.class b/it_xml.class index 2e687e1..93f8b4d 100644 --- a/it_xml.class +++ b/it_xml.class @@ -209,6 +209,9 @@ function end_element($dummy_parser, $name) if (!$this->_stack[0]->consume($this->_p)) { + if (!isset($this->_stack[1])) + $this->_stack[1] = (object)[]; + if (is_array($this->_stack[1]->$name)) array_push($this->_stack[1]->$name, $this->_stack[0]); else if (isset($this->_stack[1]->$name)) -- cgit v1.2.3