diff options
author | William Desportes <williamdes@wdes.fr> | 2019-12-31 12:20:48 +0100 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2019-12-31 12:21:44 +0100 |
commit | a1cf6c68a2b3ef052ae22b1bb0b8a99942a24e2f (patch) | |
tree | d057bda4d95ad7dc0f674acb4e2ceb04827004f3 /src | |
parent | 2c8e384a349595ad13790ca3a5357f24af916345 (diff) | |
parent | fc25e9023c7748a7a2e957c823699900257ce4e1 (diff) | |
download | sql-parser-a1cf6c68a2b3ef052ae22b1bb0b8a99942a24e2f.zip sql-parser-a1cf6c68a2b3ef052ae22b1bb0b8a99942a24e2f.tar.gz sql-parser-a1cf6c68a2b3ef052ae22b1bb0b8a99942a24e2f.tar.bz2 |
Merge #278 - Prevent overwrite of offset in Limit clause by parenthesis
Pull-request: #278
Fixes: #275
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'src')
-rw-r--r-- | src/Components/Limit.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Components/Limit.php b/src/Components/Limit.php index 17423e2..a3903b5 100644 --- a/src/Components/Limit.php +++ b/src/Components/Limit.php @@ -95,6 +95,11 @@ class Limit extends Component continue; } + // Skip if not a number + if (($token->type !== Token::TYPE_NUMBER)) { + break; + } + if ($offset) { $ret->offset = $token->value; $offset = false; |