Merge master into psgi branch
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine.pm
index 84c75e9..b34ceec 100644 (file)
@@ -128,6 +128,11 @@ sub finalize_cookies {
                 -httponly => $val->{httponly} || 0,
             )
         );
+        if (!defined $cookie) {
+            $c->log->warn("undef passed in '$name' cookie value - not setting cookie")
+                if $c->debug;
+            next;
+        }
 
         push @cookies, $cookie->as_string;
     }