diff --git a/lib/WebGUI/HTTP.pm b/lib/WebGUI/HTTP.pm index 0b98a19b8..a2a3f807e 100644 --- a/lib/WebGUI/HTTP.pm +++ b/lib/WebGUI/HTTP.pm @@ -159,7 +159,8 @@ The time that the cookie should remain in the browser. Defaults to "+10y" (10 ye sub setCookie { my $name = shift; my $value = shift; - my $ttl = shift || '+10y'; + my $ttl = shift; + $ttl = (defined $ttl ? $ttl : '+10y'); if (exists $session{req}) { my $cookie = Apache2::Cookie->new($session{req}, -name=>$name,