{"record":{"id":"2ca4b5670eb3d8dc","repo":"octobercms/october","slug":"invalid-aggregate-function-2ca4b5","errorCode":null,"errorMessage":"Invalid aggregate function: ","messagePattern":"Invalid aggregate function: ","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/dashboard/classes/ReportDateDataSet.php","lineNumber":311,"sourceCode":"\n            $aggregateFunction = $metricAggregateFunctions[$columnName];\n            switch ($aggregateFunction) {\n                case ReportMetric::AGGREGATE_COUNT:\n                    if ($metricValue !== null) {\n                        $aggregatedValue = $aggregatedValue === null ? 1 : $aggregatedValue + 1;\n                    }\n                    break;\n                case ReportMetric::AGGREGATE_MAX:\n                        $aggregatedValue = $aggregatedValue === null ? $metricValue : max($aggregatedValue, $metricValue);\n                    break;\n                case ReportMetric::AGGREGATE_MIN:\n                        $aggregatedValue = $aggregatedValue === null ? $metricValue : min($aggregatedValue, $metricValue);\n                    break;\n                case ReportMetric::AGGREGATE_SUM:\n                        $aggregatedValue = $aggregatedValue === null ? $metricValue : $aggregatedValue + $metricValue;\n                    break;\n                default:\n                    throw new ApplicationException('Invalid aggregate function: '.$aggregateFunction);\n            }\n\n            $aggregationSet->$columnName = $aggregatedValue;\n        }\n    }\n\n    private function isStartOfGroupInterval(Carbon $date): bool\n    {\n        if ($this->groupInterval === ReportDataSourceBase::GROUP_INTERVAL_WEEK) {\n            return $date->dayOfWeek === Carbon::MONDAY;\n        }\n\n        if ($this->groupInterval === ReportDataSourceBase::GROUP_INTERVAL_MONTH) {\n            return $date->day === 1;\n        }\n\n        if ($this->groupInterval === ReportDataSourceBase::GROUP_INTERVAL_QUARTER) {\n            return $date->day == 1 && in_array($date->month, [1, 4, 7, 10]);","sourceCodeStart":293,"sourceCodeEnd":329,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/dashboard/classes/ReportDateDataSet.php#L293-L329","documentation":"Error \"Invalid aggregate function: \" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/dashboard/classes/ReportDateDataSet.php:311 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}