Commit 3f4af33b authored by alexpott's avatar alexpott

Issue #3035350 by claudiu.cristea: Remove usages of drupal_static() from field_test.module

parent 59f1d6cb
......@@ -19,7 +19,7 @@ function field_test_entity_type_alter(array &$entity_types) {
* Helper function to enable entity translations.
*/
function field_test_entity_info_translatable($entity_type_id = NULL, $translatable = NULL) {
$stored_value = &drupal_static(__FUNCTION__, []);
static $stored_value = [];
if (isset($entity_type_id)) {
$entity_definition_update_manager = \Drupal::entityDefinitionUpdateManager();
$entity_type = $entity_definition_update_manager->getEntityType($entity_type_id);
......
......@@ -63,7 +63,7 @@
* for that key.
*/
function field_test_memorize($key = NULL, $value = NULL) {
$memorize = &drupal_static(__FUNCTION__, NULL);
static $memorize;
if (!isset($key)) {
$return = $memorize;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment