From 311a4b79671137845bf06535ea76bb4e0b5cfe9e Mon Sep 17 00:00:00 2001 From: Garry Collum Date: Sat, 12 Sep 2009 12:27:18 -0400 Subject: [PATCH] Bug 3602: Fixes a log error for opac-search.pl if expanded_options is not defined. Signed-off-by: Galen Charlton --- opac/opac-search.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 176b7ada5b..9261b5579e 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; } -- 2.20.1