do not decode values that are undefined
John Napiorkowski [Tue, 23 Sep 2014 17:06:15 +0000 (12:06 -0500)]
Changes
lib/Catalyst.pm

diff --git a/Changes b/Changes
index e143aea..5c246ec 100644 (file)
--- a/Changes
+++ b/Changes
@@ -6,6 +6,7 @@
     You shouldn't do this, but I guess I shouldn't have busted it either :)
   - Allow the term_width to be regenerated (see Catalyst::Utils::term_width,
     Frew Schmidt)
+  - More aggressive skipping of value decoding if the value is undefined.
 
 5.90072 - 2014-09-15
   - In the case where you call $c->req->param(undef), warn with a more useful
index 958e005..d3880e6 100644 (file)
@@ -3071,6 +3071,7 @@ sub _handle_unicode_decoding {
 
     return unless defined $value;
 
+    ## I think this mess is to support the old nested
     if ( ref $value eq 'ARRAY' ) {
         foreach ( @$value ) {
             $_ = $self->_handle_unicode_decoding($_);
@@ -3090,6 +3091,8 @@ sub _handle_unicode_decoding {
 
 sub _handle_param_unicode_decoding {
     my ( $self, $value ) = @_;
+    return unless defined $value; # not in love with just ignoring undefs - jnap
+
     my $enc = $self->encoding;
     return try {
         Encode::is_utf8( $value ) ?