Reset the static scale variable with drupal_static_reset() so that successive calls to farm_map_set_bcscale() work.

This commit is contained in:
Michael Stenta 2020-11-10 22:43:36 -05:00
parent 54cfbf5296
commit f83e56cc44
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}