diff --git a/src/PHPCR/Util/CND/Reader/BufferReader.php b/src/PHPCR/Util/CND/Reader/BufferReader.php index e9b8d0b..e38c00d 100644 --- a/src/PHPCR/Util/CND/Reader/BufferReader.php +++ b/src/PHPCR/Util/CND/Reader/BufferReader.php @@ -114,8 +114,9 @@ public function currentChar() */ public function isEof() { - return $this->currentChar() === $this->getEofMarker() - || $this->currentChar() === false + $currentChar = $this->currentChar(); + // substr after end of string returned false in PHP 5 and returns '' since PHP 7 + return in_array($currentChar, [$this->getEofMarker(), false, ''], true) || $this->startPos > strlen($this->buffer) || $this->forwardPos > strlen($this->buffer); }