diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-10 18:03:02 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-10 18:03:02 +0100 |
commit | 0529c29f5b0a196a2578b565f1eed948c2ef608e (patch) | |
tree | 2d88dcd5ad85957c93ee966d4db1029eaf5092d2 | |
parent | 71475203580fb85fc0d84dec619f0a9285898bf5 (diff) |
Fix a couple of uninitialized warnings.
-rwxr-xr-x | perllib/FixMyStreet/App/Controller/Rss.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm index 0edded1e3..db4955f06 100755 --- a/perllib/FixMyStreet/App/Controller/Rss.pm +++ b/perllib/FixMyStreet/App/Controller/Rss.pm @@ -304,7 +304,7 @@ sub local_problems_legacy : LocalRegex('^(\d+)[,/](\d+)(?:/(\d+))?$') { sub get_query_parameters : Private { my ( $self, $c, $d ) = @_; - $d = '' unless $d =~ /^\d+$/; + $d = '' unless $d && $d =~ /^\d+$/; $c->stash->{distance} = $d; my $state = $c->req->param('state') || 'all'; @@ -321,7 +321,9 @@ sub redirect_lat_lon : Private { my $d_str = ''; $d_str = '/' . $c->stash->{distance} if $c->stash->{distance}; - $c->res->redirect( "/rss/l/$lat,$lon" . $d_str . $c->stash->{state_qs} ); + my $state_qs = ''; + $state_qs = $c->stash->{state_qs} if $c->stash->{state_qs}; + $c->res->redirect( "/rss/l/$lat,$lon" . $d_str . $state_qs ); } =head1 AUTHOR |