From b44b30c09dc25a5fb0214fc41912f3b1fb30024b Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 12 Aug 2024 12:10:12 +0000 Subject: [PATCH] Bug 37508: Don't return Internal server error when running report To test: 1 - Create a report like: SELECT "a" FROM borrowers WHERE <> != '' 2 - Run report 3 - Enter "password" 4 - Internal server error / stacktrace 5 - Apply patch 6 - Repeat 7 - Get a yellow warning box Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- reports/guided_reports.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index 524dc2b98b..a5fea6fbdc 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -837,7 +837,7 @@ elsif ($phase eq 'Run this report'){ ); my $total; if (!$sth) { - die "execute_query failed to return sth for report $report_id: $sql"; + push @errors, "Report could not be run " . $errors; } elsif ( !$errors ) { $total = nb_rows($sql) || 0; my $headers = header_cell_loop($sth); -- 2.39.5