Skip to content

Commit

Permalink
Fixes undefined variable error due to variable being placed in try bl…
Browse files Browse the repository at this point in the history
…ock, but being used in finally section (#22963)

* Fixes undefined variable error

* Applied PR suggestion
  • Loading branch information
AltamashShaikh authored Jan 22, 2025
1 parent f8486dd commit bb196a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/ScheduledReports/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand All @@ -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;
Expand Down

0 comments on commit bb196a1

Please sign in to comment.