From a7dce684fc4dcfe25f16778b8fabd0aadb520224 Mon Sep 17 00:00:00 2001 From: denisdulici Date: Tue, 28 Jan 2020 16:13:00 +0300 Subject: [PATCH] check if report exists --- app/Http/Controllers/Common/Reports.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Controllers/Common/Reports.php b/app/Http/Controllers/Common/Reports.php index e35b4ca27..81407af59 100644 --- a/app/Http/Controllers/Common/Reports.php +++ b/app/Http/Controllers/Common/Reports.php @@ -31,6 +31,10 @@ class Reports extends Controller $class = Utility::getClassInstance($report, false); + if (empty($class)) { + continue; + } + $ttl = 3600 * 6; // 6 hours $totals[$report->id] = Cache::remember('reports.totals.' . $report->id, $ttl, function () use ($class) {