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;