Bug 37508: Don't return Internal server error when running report

To test:
1 - Create a report like:
SELECT "a"
FROM borrowers
WHERE <<Test>> != ''
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 <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Nick Clemens 2024-08-12 12:10:12 +00:00 committed by Katrin Fischer
parent 0c029ee849
commit ed04035e9f
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -953,7 +953,7 @@ if ($op eq 'run'){
);
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);