aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Photo.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2018-10-04 13:39:31 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-10-04 13:39:31 +0100
commita123e7da22e9dbf8d98d15287526d070ab15bf15 (patch)
tree34d6d1170fe594e22b43290c6d1e155aad044e57 /perllib/FixMyStreet/App/Controller/Photo.pm
parentb816cd81fea58adcad5ae216b4dfe9030dad40aa (diff)
Add perl 5.26/5.28 support.
Upgrade a couple of modules, deal with '.' not present in @INC, captures returning undef rather than '', and a test.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Photo.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Photo.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Photo.pm b/perllib/FixMyStreet/App/Controller/Photo.pm
index 1884b9f26..4ae25db24 100644
--- a/perllib/FixMyStreet/App/Controller/Photo.pm
+++ b/perllib/FixMyStreet/App/Controller/Photo.pm
@@ -47,6 +47,9 @@ sub index :LocalRegex('^(c/)?([1-9]\d*)(?:\.(\d+))?(?:\.(full|tn|fp))?\.(?:jpeg|
my ( $self, $c ) = @_;
my ( $is_update, $id, $photo_number, $size ) = @{ $c->req->captures };
+ $photo_number ||= 0;
+ $size ||= '';
+
my $item;
if ( $is_update ) {
($item) = $c->model('DB::Comment')->search( {