diff options
Diffstat (limited to 'perllib')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/My.pm | 6 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Bexley.pm | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/My.pm b/perllib/FixMyStreet/App/Controller/My.pm index efb770f70..1230bfcae 100644 --- a/perllib/FixMyStreet/App/Controller/My.pm +++ b/perllib/FixMyStreet/App/Controller/My.pm @@ -57,12 +57,12 @@ sub inspector_redirect : Local : Args(0) { my ( $self, $c ) = @_; my $categories = $c->user->categories_string; - my $area_ids = $c->user->area_ids; + my $area_ids = $c->user->area_ids || []; my $body = $c->user->from_body; - $c->detach('/page_error_404_not_found') unless $body && ($categories || $area_ids); + $c->detach('/page_error_404_not_found') unless $body && ($categories || @$area_ids); - if ($area_ids) { + if (@$area_ids) { my $ids_string = join ",", @$area_ids; my $areas = mySociety::MaPit::call('areas', [ $ids_string ]); $c->stash->{wards} = [ values %$areas ]; diff --git a/perllib/FixMyStreet/Cobrand/Bexley.pm b/perllib/FixMyStreet/Cobrand/Bexley.pm index ae15900d6..5a382e262 100644 --- a/perllib/FixMyStreet/Cobrand/Bexley.pm +++ b/perllib/FixMyStreet/Cobrand/Bexley.pm @@ -241,7 +241,7 @@ sub _get_bank_holiday_json { $js = $cache_file->slurp_utf8; } else { $ua->timeout(5); - $js = get("https://www.gov.uk/$file"); + $js = LWP::Simple::get("https://www.gov.uk/$file"); # uncoverable branch false $js = decode_utf8($js) if !utf8::is_utf8($js); if ($js && !FixMyStreet->config('STAGING_SITE')) { |