Issue #3035297 by claudiu.cristea, martin107, andypost: Don't use drupal_static in AutoIncrementingTestItem

merge-requests/1119/head
Nathaniel Catchpole 2019-03-19 10:52:53 +00:00
parent a0f43e0abd
commit 59f1d6cbbd
1 changed files with 2 additions and 2 deletions

View File

@ -32,8 +32,8 @@ class AutoIncrementingTestItem extends IntegerItem {
* The incremented field value.
*/
private static function getIncrementedFieldValue() {
$current_value = &drupal_static(__METHOD__, 0);
return ++$current_value;
static $cache = 0;
return ++$cache;
}
}