From f83e56cc4424debfb3ac1bed6fffb6e9f65c006a Mon Sep 17 00:00:00 2001 From: Michael Stenta Date: Tue, 10 Nov 2020 22:43:36 -0500 Subject: [PATCH] Reset the static scale variable with drupal_static_reset() so that successive calls to farm_map_set_bcscale() work. --- modules/farm/farm_map/farm_map.geo.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/farm/farm_map/farm_map.geo.inc b/modules/farm/farm_map/farm_map.geo.inc index 7dfde9026..5c8352ae9 100644 --- a/modules/farm/farm_map/farm_map.geo.inc +++ b/modules/farm/farm_map/farm_map.geo.inc @@ -48,7 +48,12 @@ function farm_map_set_bcscale($reset = FALSE) { } // Otherwise, reset. + // bcscale() sets the scale globally back to whatever it was originally when + // farm_map_set_bcscale() was first run, which we saved in the static $scale + // variable. We also unset the static $scale variable so that it can be set + // again later in the request, if necessary. bcscale($scale); + drupal_static_reset(__FUNCTION__ . 'scale'); return; }