aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@fury.ukcod.org.uk>2011-02-22 18:01:04 +0000
committerMatthew Somerville <matthew@fury.ukcod.org.uk>2011-02-22 18:01:04 +0000
commit4155222196e3a27ab8c17902fea86900fc369075 (patch)
tree86d311272027668a63d5a79d0bb2a6acede46bde
parentf66d61e117468c1a2d40a80ca7749cdedb85d87e (diff)
Fix obscure locale bug to do with stringification of numbers.
-rw-r--r--perllib/Problems.pm3
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 {