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

diff --git a/opac/opac-search.pl b/opac/opac-search.pl
index 176b7ad..9261b55 100755
--- a/opac/opac-search.pl
+++ b/opac/opac-search.pl
@@ -219,10 +219,11 @@ if ( $template_type && $template_type eq 'advsearch' ) {
                $template->param( expanded_options => 
C4::Context->preference("expandedSearchOption") );
        }
        # but let the user override it
-       if ( ($cgi->param('expanded_options') == 0) || 
($cgi->param('expanded_options') == 1 ) ) {
-       $template->param( expanded_options => $cgi->param('expanded_options'));
-       }
-
+       if (defined $cgi->param('expanded_options')) {
+           if ( ($cgi->param('expanded_options') == 0) || 
($cgi->param('expanded_options') == 1 ) ) {
+           $template->param( expanded_options => 
$cgi->param('expanded_options'));
+           }
+        }
     output_html_with_http_headers $cgi, $cookie, $template->output;
     exit;
 }
-- 
1.5.6.5

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to