From 7aed044662b3a38422ed40f5a7b14bc18daa7766 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20V=C3=A9ron?= Date: Sat, 20 Sep 2014 20:20:10 +0200 Subject: [PATCH] [SIGNED-OFF] Bug 12916 - Use of uninitialized values $max and $min in C4/Tags.pm Content-Type: text/plain; charset="utf-8" Test plan: Make sure that you have no tags In Opac, go to 'Tag cloud' Check opac-error.log for entries regarding uninitialized values $max and $min in C4/Tags.pm, line 600 Apply patch Reload page 'Tag cloud' Result: No more warnings in opac-error.log Signed-off-by: Owen Leonard --- C4/Tags.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Tags.pm b/C4/Tags.pm index b6b319b..871dcd5 100644 --- a/C4/Tags.pm +++ b/C4/Tags.pm @@ -589,7 +589,7 @@ sub add_tag { # biblionumber,term,[borrowernumber,approvernumber] sub stratify_tags { my ( $strata, $tags ) = @_; - my ( $min, $max ); + my ( $min, $max ) = ( 0, 0 ); foreach (@$tags) { my $w = $_->{weight_total}; $min = $w if ( !defined($min) || $min > $w ); -- 1.7.9.5