From 5a91642d1b0c6b031313fcfe64065edab6a237eb Mon Sep 17 00:00:00 2001 From: Philipp Frischmuth Date: Mon, 27 Jan 2014 13:11:43 +0100 Subject: [PATCH] Fix a warning in RDF/XML parser --- library/Erfurt/Syntax/RdfParser/Adapter/RdfXml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Erfurt/Syntax/RdfParser/Adapter/RdfXml.php b/library/Erfurt/Syntax/RdfParser/Adapter/RdfXml.php index 4f12422d..0d28d26e 100644 --- a/library/Erfurt/Syntax/RdfParser/Adapter/RdfXml.php +++ b/library/Erfurt/Syntax/RdfParser/Adapter/RdfXml.php @@ -202,7 +202,7 @@ protected function _startElement($parser, $name, $attrs) } $idx = xml_get_current_byte_index($parser) - $this->_offset*4096; - if (($idx >= 0) && ($this->_data[$idx].$this->_data[$idx+1]) === '/>') { + if (($idx >= 0) && (strlen($this->_data) > ($idx+1)) && ($this->_data[$idx].$this->_data[$idx+1]) === '/>') { $this->_currentElementIsEmpty = true; } else { $this->_currentElementIsEmpty = false;