Skip to content

Commit 7e57296

Browse files
committed
[CND PARSER] Fixed parsing bug
Do not crash if no more tokens after supertype declration
1 parent 7847990 commit 7e57296

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/PHPCR/Util/CND/Parser/CndParser.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,12 @@ protected function parseCndString()
672672

673673
while (true) {
674674
$token = $this->tokenQueue->peek();
675+
676+
// If there are no more tokens, break
677+
if (!$token) {
678+
break;
679+
}
680+
675681
$type = $token->getType();
676682
$data = $token->getData();
677683

0 commit comments

Comments
 (0)