From dd20cbd9ad87de7d799bd6b012cf6de0a32d5fd0 Mon Sep 17 00:00:00 2001 From: Blou Date: Tue, 15 Feb 2022 16:18:15 -0500 Subject: [PATCH] Bug 30115: Uninitialized value warning in C4/Output.pm Use of uninitialized value $url_suffix in concatenation (.) or string at GIT/C4/Output.pm line 180. Use of uninitialized value $url_suffix in concatenation (.) or string at GIT/C4/Output.pm line 197. Use of uninitialized value $url_suffix in concatenation (.) or string at GIT/C4/Output.pm line 211. This is in pagination_bar sub. A lot of pages call it. For me it happened with any Authority search (authorities/authorities-home.pl) producing multiple results. Simple fix is initializing the variable. Signed-off-by: Owen Leonard Signed-off-by: Jonathan Druart Signed-off-by: Fridolin Somers Signed-off-by: Kyle M Hall (cherry picked from commit cdab942ee00ab916ed58033a20419414c9dc21b0) Signed-off-by: Andrew Fuerste-Henry --- C4/Output.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Output.pm b/C4/Output.pm index 8ea7bb51fa..6cace41513 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -108,7 +108,7 @@ sub pagination_bar { $base_url =~ s/$delim$//; # remove trailing delim my $url = $base_url . (($base_url =~ m/$delim/ or $base_url =~ m/\?/) ? '&' : '?' ) . $startfrom_name . '='; - my $url_suffix; + my $url_suffix = ''; while ( my ( $k, $v ) = each %$additional_parameters ) { $url_suffix .= '&' . URI::Escape::uri_escape_utf8($k) . '=' . URI::Escape::uri_escape_utf8($v); } -- 2.39.5