X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fhal%2Fsrc%2FNormalizer%2FContentEntityNormalizer.php;h=eb4524728516ec75936725f28f4db3658ffa5689;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=1fc118dc5b5dc2e6f791bd62d3b77f2d5b31d852;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/hal/src/Normalizer/ContentEntityNormalizer.php b/web/core/modules/hal/src/Normalizer/ContentEntityNormalizer.php index 1fc118dc5..eb4524728 100644 --- a/web/core/modules/hal/src/Normalizer/ContentEntityNormalizer.php +++ b/web/core/modules/hal/src/Normalizer/ContentEntityNormalizer.php @@ -74,15 +74,15 @@ class ContentEntityNormalizer extends NormalizerBase { // If the fields to use were specified, only output those field values. if (isset($context['included_fields'])) { - $fields = []; + $field_items = []; foreach ($context['included_fields'] as $field_name) { - $fields[] = $entity->get($field_name); + $field_items[] = $entity->get($field_name); } } else { - $fields = $entity->getFields(); + $field_items = $entity->getFields(); } - foreach ($fields as $field) { + foreach ($field_items as $field) { // Continue if the current user does not have access to view this field. if (!$field->access('view', $context['account'])) { continue;