aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Photo.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Photo.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Photo.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Photo.pm b/perllib/FixMyStreet/App/Controller/Photo.pm
index 5712350ed..7b536a292 100644
--- a/perllib/FixMyStreet/App/Controller/Photo.pm
+++ b/perllib/FixMyStreet/App/Controller/Photo.pm
@@ -82,7 +82,7 @@ sub output : Private {
# Save to file
path(FixMyStreet->path_to('web', 'photo', 'c'))->mkpath;
my $out = FixMyStreet->path_to('web', $c->req->path);
- my $symlink_exists = symlink($photo->{symlink}, $out) if $photo->{symlink};
+ my $symlink_exists = $photo->{symlink} ? symlink($photo->{symlink}, $out) : undef;
path($out)->spew_raw($photo->{data}) unless $symlink_exists;
$c->res->content_type( $photo->{content_type} );