[Koha-patches] [PATCH] quell warning if format parameter isn't passed to opac-search.pl

Galen Charlton galen.charlton at liblime.com
Fri May 15 17:53:42 CEST 2009


---
 opac/opac-search.pl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index 03ca39a..ae7f4ea 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -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'
-- 
1.5.6.5




More information about the Koha-patches mailing list