Skip to content

Commit

Permalink
fix zero usage in sequence constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikbosch committed Dec 15, 2021
1 parent f9edcb2 commit 698a559
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Xpath/Expression/SequenceExpression.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ public function supports(Lexer $lexer): bool
$key = $lexer->key() + 1;
$commaFound = false;

while ($nextToken = $lexer->peek($key)) {
while ($lexer->peek($key) !== '') {
$nextToken = $lexer->peek($key);

if ($nextToken === '(') {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion test/Stubs/Xpath/Sequence/constructor-integer.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<xsl:template match="collection">

<xsl:value-of select="(1, 2, 3)" />
<xsl:value-of select="(0, 1, 2, 3)" />

</xsl:template>

Expand Down

0 comments on commit 698a559

Please sign in to comment.