if (@searchCategories > 0) {
my @tabcat;
foreach my $typecategory (@searchCategories) {
- my @itemtypes = Koha::ItemTypes->search({ searchcategory => $typecategory });
+ my @itemtypes = Koha::ItemTypes->search({ searchcategory => $typecategory })->as_list;
push @tabcat, $_->itemtype for @itemtypes;
}