diff options
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; } |