diff --git a/src/PHPCR/Util/CND/Parser/CndParser.php b/src/PHPCR/Util/CND/Parser/CndParser.php index 6173cc9..94c5b01 100644 --- a/src/PHPCR/Util/CND/Parser/CndParser.php +++ b/src/PHPCR/Util/CND/Parser/CndParser.php @@ -672,6 +672,12 @@ protected function parseCndString() while (true) { $token = $this->tokenQueue->peek(); + + // If there are no more tokens, break + if (!$token) { + break; + } + $type = $token->getType(); $data = $token->getData();