diff --git a/libraries/legacy/model/legacy.php b/libraries/legacy/model/legacy.php index 2a80bdaaff2ab..6ea88babe9b2c 100644 --- a/libraries/legacy/model/legacy.php +++ b/libraries/legacy/model/legacy.php @@ -321,6 +321,8 @@ protected function _getListCount($query) if ($query instanceof JDatabaseQuery && $query->type == 'select' && $query->group === null + && $query->union === null + && $query->unionAll === null && $query->having === null) { $query = clone $query;