Skip to content
Snippets Groups Projects
Commit a27a4622 authored by catch's avatar catch
Browse files

Issue #3449564 by harivansh, bbrala: Calling normalize without account context generates a warning

parent 33143c7c
No related branches found
No related tags found
No related merge requests found
......@@ -165,7 +165,7 @@ protected function serializeField($field, array $context, $format) {
// entities do not have "real" fields and therefore do not have field access
// restrictions.
if ($field instanceof FieldItemListInterface) {
$field_access_result = $field->access('view', $context['account'], TRUE);
$field_access_result = $field->access('view', $context['account'] ?? NULL, TRUE);
if (!$field_access_result->isAllowed()) {
return new CacheableOmission(CacheableMetadata::createFromObject($field_access_result));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment