From f41e7398857cc9f76c0bcdf01e3426c192e773e0 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 --- C4/Serials.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index ec88b0f3e6..6aee57e381 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -2003,8 +2003,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