From: James Chao Date: Thu, 21 Jul 2016 16:41:57 +0000 (-0500) Subject: Prevent error on param encoding if encoding is not specified X-Git-Tag: 5.90112~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=4dee90936d34763db2a273855abadc52cd65c379 Prevent error on param encoding if encoding is not specified --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 7f9fe30..e68e18c 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -3654,6 +3654,9 @@ sub _handle_param_unicode_decoding { return $value if blessed($value); #don't decode when the value is an object. my $enc = $self->encoding; + + return $value unless $enc; # don't decode if no encoding is specified + $check ||= $self->_encode_check; return try { $enc->decode( $value, $check);