From bb196a1e1aa8cc3dd288685c65cd9928aa617fbb Mon Sep 17 00:00:00 2001 From: Altamash Shaikh Date: Wed, 22 Jan 2025 19:01:39 +0530 Subject: [PATCH] Fixes undefined variable error due to variable being placed in try block, but being used in finally section (#22963) * Fixes undefined variable error * Applied PR suggestion --- plugins/ScheduledReports/API.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ScheduledReports/API.php b/plugins/ScheduledReports/API.php index 211411a92e5..e9325b8fc5e 100644 --- a/plugins/ScheduledReports/API.php +++ b/plugins/ScheduledReports/API.php @@ -410,6 +410,7 @@ public function generateReport( $originalShowEvolutionWithinSelectedPeriod = Config::getInstance()->General['graphs_show_evolution_within_selected_period']; $originalDefaultEvolutionGraphLastPeriodsAmount = Config::getInstance()->General['graphs_default_evolution_graph_last_days_amount']; + $initialFilterTruncate = Common::getRequestVar('filter_truncate', false); try { Config::setSetting('General', 'graphs_show_evolution_within_selected_period', (bool)$report['evolution_graph_within_period']); Config::setSetting('General', 'graphs_default_evolution_graph_last_days_amount', $report['evolution_graph_period_n']); @@ -427,7 +428,6 @@ public function generateReport( // the report will be rendered with the first 23 rows and will aggregate other rows in a summary row // 23 rows table fits in one portrait page - $initialFilterTruncate = Common::getRequestVar('filter_truncate', false); $_GET['filter_truncate'] = Config::getInstance()->General['scheduled_reports_truncate']; $prettyDate = null;