summaryrefslogtreecommitdiffstats
path: root/query.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'query.cgi')
-rwxr-xr-xquery.cgi2
1 files changed, 1 insertions, 1 deletions
diff --git a/query.cgi b/query.cgi
index 2806cdd24..065709c2f 100755
--- a/query.cgi
+++ b/query.cgi
@@ -443,7 +443,7 @@ if (!($cgi->param('query_format') || $cgi->param('format'))) {
# Set cookie to current format as default, but only if the format
# one that we should remember.
-if (IsValidQueryType($vars->{'format'})) {
+if (defined($vars->{'format'}) && IsValidQueryType($vars->{'format'})) {
$cgi->send_cookie(-name => 'DEFAULTFORMAT',
-value => $vars->{'format'},
-expires => "Fri, 01-Jan-2038 00:00:00 GMT");