@@ -, +, @@ Apparent command =cut not preceded by blank line Can't call method "biblio" on an undefined value at C4/Items.pm line 669. --- C4/Biblio.pm | 1 + C4/Items.pm | 2 +- tools/batchMod.pl | 7 ++++++- 3 files changed, 8 insertions(+), 2 deletions(-) --- a/C4/Biblio.pm +++ a/C4/Biblio.pm @@ -1442,6 +1442,7 @@ sub GetMarcPrice { =head2 MungeMarcPrice Return the best guess at what the actual price is from a price field. + =cut sub MungeMarcPrice { --- a/C4/Items.pm +++ a/C4/Items.pm @@ -666,7 +666,7 @@ sub DelItem { unless ($biblionumber) { my $item = Koha::Items->find( $itemnumber ); - $biblionumber = $item->biblio->biblionumber; + $biblionumber = $item ? $item->biblio->biblionumber : undef; } # If there is no biblionumber for the given itemnumber, there is nothing to delete --- a/tools/batchMod.pl +++ a/tools/batchMod.pl @@ -125,7 +125,12 @@ if ($op eq "action") { my @simple_items_display = map { my $itemnumber = $_; my $item = Koha::Items->find($itemnumber); - { itemnumber => $itemnumber, barcode => ($item->barcode || q||), biblionumber => $item->biblio->biblionumber }} @itemnumbers; + { + itemnumber => $itemnumber, + barcode => $item ? ( $item->barcode // q{} ) : q{}, + biblionumber => $item ? $item->biblio->biblionumber : q{}, + }; + } @itemnumbers; $template->param("simple_items_display" => \@simple_items_display); } --