diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-13 01:46:54 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-13 01:46:54 +0100 |
commit | 543ff3b83f4732df2cf60ac0b9ac64b145c01ae4 (patch) | |
tree | aefee057c0aca6ee5e2532658a2f2c1aeb81c348 /perllib/FixMyStreet/App/Controller | |
parent | e754a8d985d68daa345e58deddfca9ecb2ba09ba (diff) |
Return 404 rather than error from missing template.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Photo.pm | 3 |
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 ) { |