There was an error while loading. Please reload this page.
1 parent daa252b commit 73efd6eCopy full SHA for 73efd6e
1 file changed
libraries/classes/Sql.php
@@ -701,7 +701,7 @@ private function countQueryResults(
701
$statement->limit = false;
702
}
703
704
- if (! $statementInfo->isGroup && count($statement->expr) === 1) {
+ if (! $statementInfo->isGroup && ! $statementInfo->distinct && count($statement->expr) === 1) {
705
$statement->expr[0] = new Expression();
706
$statement->expr[0]->expr = '1';
707
0 commit comments