Fix issue with requesting a cookie that doesn't exist.

        Patch by mark. 

diffs (14 lines):

diff -r 48a202889c55 -r 2e0690ee55e1 cgi-bin/DW/Request/Base.pm
--- a/cgi-bin/DW/Request/Base.pm        Sun May 02 00:07:42 2010 +0000
+++ b/cgi-bin/DW/Request/Base.pm        Sun May 02 00:10:33 2010 +0000
@@ -39,8 +39,8 @@ sub cookie {
     my DW::Request::Base $self = $_[0];
 
     $self->parse( $self->header_in( 'Cookie' ) ) unless defined 
$self->{cookies_in};
-    my $val = $self->{cookies_in}->{$_[1]};
-    return wantarray ? @{ $val } : $val->[0];
+    my $val = $self->{cookies_in}->{$_[1]} || [];
+    return wantarray ? @$val : $val->[0];
 }
 
 sub cookie_multi {
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog

Reply via email to