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 <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7d75ec3e26)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit f41e739885)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2024-05-23 09:50:59 +02:00 committed by Lucas Gass
parent 02f57e92b9
commit 5141dbe562

View file

@ -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;
}