--- Webpacus/lib/Webpacus/Model/WebPAC.pm 2006/05/07 20:40:28 453 +++ Webpacus/lib/Webpacus/Model/WebPAC.pm 2006/05/22 22:23:21 533 @@ -705,14 +705,19 @@ my $s; if ($s_el > 0) { - $s = $item->{'search'}->[$i] or warn "can't find value $i for type search in field $search"; + $s = $item->{'search'}->[$i]; } else { $s = $item->{'search'}->[0]; } + + next unless (defined($s) && $s ne ''); + #$s =~ s/([^\w.-])/sprintf("%%%02X",ord($1))/eg; $s = __quotemeta( $s ); - my $d = $item->{'display'}->[$i] or warn "can't find value $i for type display in field $display"; + my $d = $item->{'display'}->[$i]; + + next unless (defined($d) && $d ne ''); my $template_arg = ''; $template_arg = qq{,'$template'} if ($template);