foreach my $piece ( @$line ) {
if ( ref( $piece ) eq 'HASH' ) {
+ if ( !$piece->{'pref'} ){ next; }
if ( $piece->{'pref'} =~ /^$searchfield$/i ) {
my ( undef, $LINES ) = TransformPrefsToHTML( $data, $searchfield );
sub matches {
my ( $text, $terms ) = @_;
- return !grep( { $text !~ /$_/i } @$terms );
+ if ( $text ) { return !grep( { $text !~ /$_/i } @$terms ); }
}
my $dbh = C4::Context->dbh;