Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Query/Mysql/ConcatWs.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public function parse(Parser $parser): void
$this->values[] = $parser->ArithmeticExpression();

// Add the rest of the strings to the values array. CONCAT_WS must
// be used with at least 2 strings not including the separator.
// be used with at least 1 string not including the separator.

$lexer = $parser->getLexer();

while (count($this->values) < 3 || $lexer->lookahead->type === TokenType::T_COMMA) {
while (count($this->values) < 2 || $lexer->lookahead->type === TokenType::T_COMMA) {
$parser->match(TokenType::T_COMMA);
$peek = $lexer->glimpse();

Expand Down