quell warning if format parameter isn't passed to opac-search.pl
authorGalen Charlton <galen.charlton@liblime.com>
Fri, 15 May 2009 15:53:42 +0000 (10:53 -0500)
committerGalen Charlton <galen.charlton@liblime.com>
Fri, 15 May 2009 20:52:26 +0000 (15:52 -0500)
Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
opac/opac-search.pl

index 03ca39a..ae7f4ea 100755 (executable)
@@ -632,9 +632,9 @@ if (defined $barshelves) {
 
 my $content_type;
 
-if ($cgi->param('format') =~ /rss/) {
+if ($cgi->param('format') && $cgi->param('format') =~ /rss/) {
     $content_type = 'rss'
-} elsif ($cgi->param('format') =~ /atom/) {
+} elsif ($cgi->param('format') && $cgi->param('format') =~ /atom/) {
     $content_type = 'atom'
 } else {
     $content_type = 'html'