diff options
author | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-02-22 18:01:04 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-02-22 18:01:04 +0000 |
commit | 4155222196e3a27ab8c17902fea86900fc369075 (patch) | |
tree | 86d311272027668a63d5a79d0bb2a6acede46bde | |
parent | f66d61e117468c1a2d40a80ca7749cdedb85d87e (diff) |
Fix obscure locale bug to do with stringification of numbers.
-rw-r--r-- | perllib/Problems.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perllib/Problems.pm b/perllib/Problems.pm index 127d88a30..3710c3a95 100644 --- a/perllib/Problems.pm +++ b/perllib/Problems.pm @@ -91,7 +91,8 @@ sub recent_photos { my ($num, $lat, $lon, $dist) = @_; my $probs; if (defined $lat) { - my $key = "recent_photos:$site_key:$num:$lat:$lon:$dist"; + my $dist2 = $dist; # Create a copy of the variable to stop it being stringified into a locale in the next line! + my $key = "recent_photos:$site_key:$num:$lat:$lon:$dist2"; $probs = Memcached::get($key); unless ($probs) { $probs = mySociety::Locale::in_gb_locale { |