From: John Napiorkowski Date: Thu, 7 Nov 2013 17:02:38 +0000 (-0600) Subject: make sure env exists before tryint to access it to fix CAR regression X-Git-Tag: 5.90051~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b111b5c1622ce29ea5524b552ddb1ab8ea614a1a;p=catagits%2FCatalyst-Runtime.git make sure env exists before tryint to access it to fix CAR regression --- diff --git a/lib/Catalyst/Request.pm b/lib/Catalyst/Request.pm index 69ddd69..9f0e4ec 100644 --- a/lib/Catalyst/Request.pm +++ b/lib/Catalyst/Request.pm @@ -243,7 +243,7 @@ sub prepare_body { # If previously applied middleware created the HTTP::Body object, then we # just use that one. - if(my $plack_body = $self->env->{'plack.request.http.body'}) { + if(my $plack_body = $self->_has_env ? $self->env->{'plack.request.http.body'} : undef) { $self->_body($plack_body); $self->_body->cleanup(1); return;