diff options
author | Struan Donald <struan@exo.org.uk> | 2011-05-27 12:10:15 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-05-27 12:10:15 +0100 |
commit | f24f8ee1d1f110f7ba575a714e883f255a1f9f95 (patch) | |
tree | 9138525188c8b715decc28339b33ebd132d154ec /perllib/FixMyStreet/App/Controller | |
parent | f0fec246dcb758898d83087333c71d9dbdbbd906 (diff) |
do not fall over if the user visits /alert/subscribe with no parameters or no email
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Alert.pm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm index 45696e4e7..b8b7cce40 100644 --- a/perllib/FixMyStreet/App/Controller/Alert.pm +++ b/perllib/FixMyStreet/App/Controller/Alert.pm @@ -58,9 +58,14 @@ sub subscribe : Path('subscribe') : Args(0) { if ( $c->req->param('rss') ) { $c->detach('rss'); } - elsif ( $c->req->param('rznvy') ) { + # if it exists then it's been submitted so we should + # go to subscribe email and let it work out the next step + elsif ( exists $c->req->params->{'rznvy'} ) { $c->detach('subscribe_email'); } + + # shouldn't get to here but if we have then do something sensible + $c->go('index'); } =head2 rss |