Bug 29284: (follow-up) Fix code that I copied from too

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit c32cca53bd)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
This commit is contained in:
Nick Clemens 2021-10-21 10:31:18 +00:00 committed by Victor Grousset/tuxayo
parent 5da806bc25
commit b1fec5be3e
2 changed files with 8 additions and 2 deletions

View File

@ -515,7 +515,10 @@ eval {
};
if ($@ || $error) {
$template->param(query_error => $error.$@);
my $query_error = q{};
$query_error .= $error if $error;
$query_error .= $@ if $@;
$template->param(query_error => $query_error);
output_html_with_http_headers $cgi, $cookie, $template->output;
exit;
}

View File

@ -597,7 +597,10 @@ if ($tag) {
# use Data::Dumper; print STDERR "-" x 25, "\n", Dumper($results_hashref);
if (not $tag and ( $@ || $error)) {
$template->param(query_error => $error.$@);
my $query_error = q{};
$query_error .= $error if $error;
$query_error .= $@ if $@;
$template->param(query_error => $query_error);
output_html_with_http_headers $cgi, $cookie, $template->output;
exit;
}