@@ -, +, @@ --- misc/maintenance/search_for_data_inconsistencies.pl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) --- a/misc/maintenance/search_for_data_inconsistencies.pl +++ a/misc/maintenance/search_for_data_inconsistencies.pl @@ -54,10 +54,17 @@ use Koha::Authorities; if ( $items_without_itype->count ) { new_section("Items do not have itype defined"); while ( my $item = $items_without_itype->next ) { - new_item( - sprintf "Item with itemnumber=%s does not have a itype value, biblio's item type will be used (%s)", - $item->itemnumber, $item->biblioitem->itemtype - ); + if (defined $item->biblioitem->itemtype) { + new_item( + sprintf "Item with itemnumber=%s does not have a itype value, biblio's item type will be used (%s)", + $item->itemnumber, $item->biblioitem->itemtype + ); + } else { + new_item( + sprintf "Item with itemnumber=%s does not have a itype value, additionally no item type defined for biblionumber=%s", + $item->itemnumber, $item->biblioitem->biblionumber + ); + } } new_hint("The system preference item-level_itypes expects item types to be defined at item level"); } --