Commit 223ecdb9 authored by catch's avatar catch
Browse files

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

(cherry picked from commit a27a4622)
parent 675dbc95
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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));
      }