@@ -, +, @@
---
C4/Search.pm | 6 ++++++
.../marc21/zebraexport/large_biblio/exported_records.xml | 4 ++++
2 files changed, 10 insertions(+)
--- a/C4/Search.pm
+++ a/C4/Search.pm
@@ -1800,6 +1800,12 @@ sub searchResults {
foreach my $code ( keys %subfieldstosearch ) {
$item->{$code} = $field->subfield( $subfieldstosearch{$code} );
}
+
+ unless ( $item->{itemnumber} ) {
+ warn "MARC item without itemnumber retrieved for biblio ($oldbiblio->{biblionumber})";
+ next;
+ }
+
$item->{description} = $itemtypes{ $item->{itype} }{translated_description} if $item->{itype};
# OPAC hidden items
--- a/t/db_dependent/data/marc21/zebraexport/large_biblio/exported_records.xml
+++ a/t/db_dependent/data/marc21/zebraexport/large_biblio/exported_records.xml
@@ -1662,18 +1662,22 @@
aaabbb
1
+ 123
bbbccc
0
+ 124
cccddd
1
+ 125
300
300
+ 126
--