aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 {