Bug 8612: Remove warnings from tests
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 5 Jun 2017 15:35:10 +0000 (12:35 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 5 Jun 2017 15:36:12 +0000 (12:36 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Acquisition.pm

index 16f4424..ed80b26 100644 (file)
@@ -315,8 +315,11 @@ sub GetBasketAsCSV {
             my $bd = GetBiblioData( $order->{'biblionumber'} );
             my @biblioitems = GetBiblioItemByBiblioNumber( $order->{'biblionumber'});
             for my $biblioitem (@biblioitems) {
-                if ($biblioitem->{isbn} eq $order->{isbn}) {
-                    $order = {%$order, %$biblioitem};
+                if (    $biblioitem->{isbn}
+                    and $order->{isbn}
+                    and $biblioitem->{isbn} eq $order->{isbn} )
+                {
+                    $order = { %$order, %$biblioitem };
                 }
             }
             if ($contract) {