skip setting cookies that can't be created successfully
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Engine.pm
index e770f32..a442f6b 100644 (file)
@@ -93,6 +93,7 @@ sub finalize_cookies {
                 -httponly => $val->{httponly} || 0,
             )
         );
+        next if(!defined $cookie); # warn?
 
         push @cookies, $cookie->as_string;
     }
@@ -727,7 +728,7 @@ not directly available via Catalyst objects $c->request, $c->engine ...
 
 BEWARE: If you really need to access some environment variable from your Catalyst
 application you should use $c->engine->env->{VARNAME} instead of $ENV{VARNAME},
-as in some enviroments the %ENV hash does not contain what you would expect.
+as in some environments the %ENV hash does not contain what you would expect.
 
 =head1 AUTHORS