diff options
author | Dan Ungureanu <udan1107@gmail.com> | 2015-07-25 14:31:59 +0300 |
---|---|---|
committer | Dan Ungureanu <udan1107@gmail.com> | 2015-07-25 14:31:59 +0300 |
commit | f1b0644ea90d427acd58aefc9d27137349fc13f3 (patch) | |
tree | 89c9336c157aea3d4701b2c984da7f257ef5c7ca /src/Utils/Query.php | |
parent | 6e335616597277d0687bd036fc9acc05386369a0 (diff) | |
download | sql-parser-f1b0644ea90d427acd58aefc9d27137349fc13f3.zip sql-parser-f1b0644ea90d427acd58aefc9d27137349fc13f3.tar.gz sql-parser-f1b0644ea90d427acd58aefc9d27137349fc13f3.tar.bz2 |
Fixed some Scrutinizer issues.
Diffstat (limited to 'src/Utils/Query.php')
-rw-r--r-- | src/Utils/Query.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Utils/Query.php b/src/Utils/Query.php index 1f887ab..c11e858 100644 --- a/src/Utils/Query.php +++ b/src/Utils/Query.php @@ -536,7 +536,7 @@ class Query // This is a cheap fix for `SELECT` statements that contain `UNION`. // Replacing the `ORDER BY` or `LIMIT` clauses should replace the last // clause. - if (!empty($statement->union)) { + if (($statement instanceof SelectStatement) && (!empty($statement->union))) { $clauses['ORDER BY'] = count($clauses) + 1; $clauses['LIMIT'] = count($clauses) + 2; } |