diff --git a/mod/forum/report/summary/classes/summary_table.php b/mod/forum/report/summary/classes/summary_table.php index 43c5b882a3ab1..6c451bfc7e84f 100644 --- a/mod/forum/report/summary/classes/summary_table.php +++ b/mod/forum/report/summary/classes/summary_table.php @@ -351,13 +351,13 @@ public function col_export(\stdClass $data): string { ]; // Add relevant filter params. - foreach ($this->exportfilterdata as $name => $data) { - if (is_array($data)) { - foreach ($data as $key => $value) { + foreach ($this->exportfilterdata as $name => $filterdata) { + if (is_array($filterdata)) { + foreach ($filterdata as $key => $value) { $params["{$name}[{$key}]"] = $value; } } else { - $params[$name] = $data; + $params[$name] = $filterdata; } }