diff options
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Location.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Location.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Location.pm b/perllib/FixMyStreet/App/Controller/Location.pm index 9f8260768..df8a090c2 100644 --- a/perllib/FixMyStreet/App/Controller/Location.pm +++ b/perllib/FixMyStreet/App/Controller/Location.pm @@ -76,12 +76,12 @@ sub determine_location_from_pc : Private { # $error doubles up to return multiple choices by being an array if ( ref($error) eq 'ARRAY' ) { - @$error = map { - decode_utf8($_); - s/, United Kingdom//; - s/, UK//; - $_; - } @$error; + foreach (@$error) { + my $a = decode_utf8($_->{address}); + $a =~ s/, United Kingdom//; + $a =~ s/, UK//; + $_->{address} = $a; + } $c->stash->{possible_location_matches} = $error; return; } |