aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Map.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-08-15 13:16:36 +0100
committerMatthew Somerville <matthew@mysociety.org>2016-08-15 13:16:36 +0100
commit30bbbbd885e6a52a4a5be4f7392ae25d6bb52d77 (patch)
tree415e1dd59bc665b2e4865bf9fe1c3da7096e082f /perllib/FixMyStreet/Map.pm
parenta228f4b05afabe26a1b97a874d82ee838b69e3c4 (diff)
Prevent error if latitude or longitude of 0 given.
Diffstat (limited to 'perllib/FixMyStreet/Map.pm')
-rw-r--r--perllib/FixMyStreet/Map.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Map.pm b/perllib/FixMyStreet/Map.pm
index a850492b9..5272e3932 100644
--- a/perllib/FixMyStreet/Map.pm
+++ b/perllib/FixMyStreet/Map.pm
@@ -74,7 +74,7 @@ sub map_features {
@p{"min_lon", "min_lat", "max_lon", "max_lat"} = split /,/, $p{bbox};
}
- if ($p{latitude} && $p{longitude}) {
+ if (defined $p{latitude} && defined $p{longitude}) {
# TODO - be smarter about calculating the surrounding square
# use deltas that are roughly 500m in the UK - so we get a 1 sq km search box
my $lat_delta = 0.00438;