Skip to content

Commit 4e95847

Browse files
committed
Fix another deprecated findAll
1 parent 05c4f88 commit 4e95847

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/Controller/StatsController.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public function stats(): void
7777
$query = [
7878
'group' => 'grouped_by',
7979
'order' => 'Incidents.created',
80+
'conditions' => [],
8081
];
8182

8283
if (isset($filter['limit'])) {
@@ -88,7 +89,12 @@ public function stats(): void
8889
$this->Incidents->recursive = -1;
8990
$downloadStats = Cache::read('downloadStats_' . $filter_string);
9091
if ($downloadStats === null) {
91-
$downloadStats = $this->Incidents->find('all', $query);
92+
$downloadStats = $this->Incidents->find(
93+
'all',
94+
group: $query['group'],
95+
order: $query['order'],
96+
conditions: $query['conditions'],
97+
);
9298
$downloadStats->select([
9399
'grouped_by' => $filter['group'],
94100
'date' => "DATE_FORMAT(Incidents.created, '%a %b %d %Y %T')",

0 commit comments

Comments
 (0)