aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-05-27 12:22:41 +0100
committerStruan Donald <struan@exo.org.uk>2011-05-27 12:22:41 +0100
commitf90e024af0cdc65d3c7671684eb096cc4d537917 (patch)
tree2ce6f76646f855981399169113709b042e0fdba8
parentf24f8ee1d1f110f7ba575a714e883f255a1f9f95 (diff)
stop immediately if we do not have the problem id
-rw-r--r--perllib/FixMyStreet/App/Controller/Report/Update.pm4
1 files changed, 4 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report/Update.pm b/perllib/FixMyStreet/App/Controller/Report/Update.pm
index be0f8dc16..e8bb0f70d 100644
--- a/perllib/FixMyStreet/App/Controller/Report/Update.pm
+++ b/perllib/FixMyStreet/App/Controller/Report/Update.pm
@@ -20,6 +20,10 @@ Creates an update to a report
sub report_update : Path : Args(0) {
my ( $self, $c ) = @_;
+ # if there's no id then we should just stop now
+ $c->detach( '/page_error_404_not_found', [ _('Unknown problem ID') ] )
+ unless $c->req->param('id');
+
$c->forward('setup_page')
&& $c->forward('process_user')
&& $c->forward('process_update')