From 66683318ff16241952ca5e207ac535f949b3902b Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 21 Oct 2021 10:31:18 +0000 Subject: [PATCH] Bug 29284: (follow-up) Fix code that I copied from too Signed-off-by: Jonathan Druart --- catalogue/search.pl | 5 ++++- opac/opac-search.pl | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index 9c99bbe4f3..c0063a1b40 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -507,7 +507,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; } diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 0bd1026faf..22e97da817 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -574,7 +574,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; } -- 2.39.5