From 5d3293a59bff5b384b5349d7d690eeaf19c886c4 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Fri, 22 Apr 2016 12:57:56 +0100 Subject: Don't warn on bad photo hashes. --- perllib/FixMyStreet/App/Model/PhotoSet.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perllib') diff --git a/perllib/FixMyStreet/App/Model/PhotoSet.pm b/perllib/FixMyStreet/App/Model/PhotoSet.pm index b783a20e6..243675f2c 100644 --- a/perllib/FixMyStreet/App/Model/PhotoSet.pm +++ b/perllib/FixMyStreet/App/Model/PhotoSet.pm @@ -176,7 +176,7 @@ has ids => ( # Arrayref of $fileid tuples (always, so post upload/raw data proc } my ($fileid, $type) = split /\./, $part; $type ||= 'jpeg'; - if (length($fileid) == 40) { + if ($fileid && length($fileid) == 40) { my $file = $self->get_file($fileid, $type); if ($file->exists) { $file->basename; @@ -185,7 +185,7 @@ has ids => ( # Arrayref of $fileid tuples (always, so post upload/raw data proc (); } } else { - warn sprintf "Received bad photo hash of length %d", length($fileid); + # A bad hash, probably a bot spamming with bad data. (); } }); -- cgit v1.2.3