From cf64b9f38956ebaa7742fec630c0ca41b1c15a3d Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Fri, 8 Jul 2005 10:39:19 +0000 Subject: Bug 300006: "cookies need value" error code when a query returns an empty result. Patch By Marc Schumann r=glob, a=justdave --- colchange.cgi | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'colchange.cgi') diff --git a/colchange.cgi b/colchange.cgi index 235da6a01..30103406f 100755 --- a/colchange.cgi +++ b/colchange.cgi @@ -103,9 +103,14 @@ if (defined $cgi->param('rememberedquery')) { my $list = join(" ", @collist); my $urlbase = Param("urlbase"); - $cgi->send_cookie(-name => 'COLUMNLIST', - -value => $list, - -expires => 'Fri, 01-Jan-2038 00:00:00 GMT'); + if ($list) { + $cgi->send_cookie(-name => 'COLUMNLIST', + -value => $list, + -expires => 'Fri, 01-Jan-2038 00:00:00 GMT'); + } + else { + $cgi->remove_cookie('COLUMNLIST'); + } if ($splitheader) { $cgi->send_cookie(-name => 'SPLITHEADER', -value => $splitheader, -- cgit v1.2.3-24-g4f1b