$template->param(items => \@itemloop);
}
# Get the item types list, but only if item_level_itype is YES. Otherwise, it will be in the item, no need to display it in the biblio
-my @itemtypes = C4::ItemType->all unless C4::Context->preference('item-level_itypes');
+my @itemtypes;
+@itemtypes = C4::ItemType->all unless C4::Context->preference('item-level_itypes');
# fill template
$template->param(