fix undef values in params sent to uri_with() and uri_for()
[catagits/Catalyst-Runtime.git] / lib / Catalyst.pm
index 06343ac..5edff66 100644 (file)
@@ -925,6 +925,7 @@ sub uri_for {
       ( scalar @args && ref $args[$#args] eq 'HASH' ? pop @args : {} );
 
     for my $value ( values %$params ) {
+        next unless defined $value;
         for ( ref $value eq 'ARRAY' ? @$value : $value ) {
             $_ = "$_";
             utf8::encode( $_ );