From 5141dbe562062ea185d43ddf9c3b1f488dca03d1 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 23 May 2024 09:50:59 +0200 Subject: [PATCH] Bug 36939: Remove a warning from Serials.t t/db_dependent/Serials.t .. 2/57 Use of uninitialized value in numeric gt (>) at /kohadevbox/koha/C4/Serials.pm line 2029. Signed-off-by: David Nind Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer (cherry picked from commit 7d75ec3e2602dcadbb238dfb7cbec76020ebafef) Signed-off-by: Fridolin Somers (cherry picked from commit f41e7398857cc9f76c0bcdf01e3426c192e773e0) Signed-off-by: Lucas Gass --- C4/Serials.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 31a61c05fa..6cf5119884 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -1964,8 +1964,8 @@ sub addroutingmember { my $sth = $dbh->prepare( "SELECT max(ranking) rank FROM subscriptionroutinglist WHERE subscriptionid = ?" ); $sth->execute($subscriptionid); while ( my $line = $sth->fetchrow_hashref ) { - if ( $line->{'rank'} > 0 ) { - $rank = $line->{'rank'} + 1; + if ( defined $line->{rank} && $line->{rank} > 0 ) { + $rank = $line->{rank} + 1; } else { $rank = 1; } -- 2.39.5