diff options
author | Matthew Somerville <matthew@mysociety.org> | 2016-04-22 12:57:56 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2016-04-22 12:57:56 +0100 |
commit | 5d3293a59bff5b384b5349d7d690eeaf19c886c4 (patch) | |
tree | ae40e1ec02749baa6acf475372b6a20e5da30b69 | |
parent | beee3223643a5611ee4aaa92e0b60fae7a13d839 (diff) |
Don't warn on bad photo hashes.
-rw-r--r-- | perllib/FixMyStreet/App/Model/PhotoSet.pm | 4 |
1 files changed, 2 insertions, 2 deletions
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. (); } }); |