diff options
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Photo.pm')
-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 ) { |