Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Biblio.pm line 3049.
Created attachment 184125 [details] [review] Bug 40403: Remove warning from Circulation_holdsqueue.t Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Biblio.pm line 3049. The context is: 3045 my $current_issues = $biblioitem->totalissues // 0; 3046 if ( defined $value ) { 3047 $totalissues = $value; 3048 } else { 3049 $totalissues = $biblioitem->totalissues + $increase; 3050 } 3051 return 0 if $current_issues == $totalissues; # No need to update if no changes It feels correct to use $current_issues to suppress the warning
Created attachment 184295 [details] [review] Bug 40403: Remove warning from Circulation_holdsqueue.t Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Biblio.pm line 3049. The context is: 3045 my $current_issues = $biblioitem->totalissues // 0; 3046 if ( defined $value ) { 3047 $totalissues = $value; 3048 } else { 3049 $totalissues = $biblioitem->totalissues + $increase; 3050 } 3051 return 0 if $current_issues == $totalissues; # No need to update if no changes It feels correct to use $current_issues to suppress the warning Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD): 1. prove t/db_dependent/Circulation_holdsqueue.t
Created attachment 184308 [details] [review] Bug 40403: Remove warning from Circulation_holdsqueue.t Use of uninitialized value in addition (+) at /kohadevbox/koha/C4/Biblio.pm line 3049. The context is: 3045 my $current_issues = $biblioitem->totalissues // 0; 3046 if ( defined $value ) { 3047 $totalissues = $value; 3048 } else { 3049 $totalissues = $biblioitem->totalissues + $increase; 3050 } 3051 return 0 if $current_issues == $totalissues; # No need to update if no changes It feels correct to use $current_issues to suppress the warning Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Nice work everyone! Pushed to main for 25.11
Nice work everyone! Pushed to 25.05.x
Pushed to 24.11.x for 24.11.08
Not backporting to 22.11.x as it wasn't backported to 24.05.x
Test suite related, no changes to manual required.