aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2011-06-13 01:46:54 +0100
committerMatthew Somerville <matthew@mysociety.org>2011-06-13 01:46:54 +0100
commit543ff3b83f4732df2cf60ac0b9ac64b145c01ae4 (patch)
treeaefee057c0aca6ee5e2532658a2f2c1aeb81c348
parente754a8d985d68daa345e58deddfca9ecb2ba09ba (diff)
Return 404 rather than error from missing template.
-rw-r--r--perllib/FixMyStreet/App/Controller/Photo.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Photo.pm b/perllib/FixMyStreet/App/Controller/Photo.pm
index 3c6255f3a..ac0c891d4 100644
--- a/perllib/FixMyStreet/App/Controller/Photo.pm
+++ b/perllib/FixMyStreet/App/Controller/Photo.pm
@@ -30,7 +30,8 @@ sub index :Path :Args(0) {
my $id = $c->req->param('id');
my $comment = $c->req->param('c');
- return unless ( $id || $comment );
+ $c->detach( '/page_error_404_not_found', [ 'No photo' ] )
+ unless $id || $comment;
my @photo;
if ( $comment ) {