Skip to content

Commit

Permalink
Fix a warning in RDF/XML parser
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Frischmuth committed Jan 27, 2014
1 parent 8029538 commit 5a91642
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/Erfurt/Syntax/RdfParser/Adapter/RdfXml.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5a91642

Please sign in to comment.