We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8bfcacd commit 35ad38bCopy full SHA for 35ad38b
libraries/src/MVC/Model/BaseDatabaseModel.php
@@ -356,11 +356,11 @@ protected function _getListCount($query)
356
357
// Otherwise fall back to inefficient way of counting all results.
358
359
- // Remove the limit and offset part if it's a \JDatabaseQuery object
+ // Remove the limit, offset and order parts if it's a \JDatabaseQuery object
360
if ($query instanceof \JDatabaseQuery)
361
{
362
$query = clone $query;
363
- $query->clear('limit')->clear('offset');
+ $query->clear('limit')->clear('offset')->clear('order');
364
}
365
366
$this->getDbo()->setQuery($query);
0 commit comments