Bug 24598: Remove warning from test
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 8 Oct 2020 10:03:48 +0000 (12:03 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 8 Oct 2020 11:51:47 +0000 (13:51 +0200)
t/db_dependent/Koha/Items.t .. 6/12 Use of uninitialized value in string eq at /kohadevbox/koha/C4/Circulation.pm line 1460.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Circulation.pm

index aa917a9..2f91511 100644 (file)
@@ -1457,7 +1457,7 @@ sub AddIssue {
                         comments    => 'Forced branchtransfer'
                     }
                 )->store;
-                if ( $transfer->reason eq 'Reserve' ) {
+                if ( $transfer->reason && $transfer->reason eq 'Reserve' ) {
                     my $hold = $item_object->holds->search( { found => 'T' } )->next;
                     if ( $hold ) { # Is this really needed?
                         $hold->set( { found => undef } )->store;