Verified Commit 7269e3b4 authored by Lee Rowlands's avatar Lee Rowlands Committed by Lee Rowlands
Browse files

Issue #3302818 by larowlan: Handle corrupt field maps gracefully

parent 322d9f15
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -60,6 +60,14 @@ class ContentAnalysis {
      'stripped_tags' => [],
      'stripped_attributes' => [],
    ];
    if (!$entity->hasField($field_name)) {
      AnalysisResult::create([
        'name' => $entity->label(),
        'content' => $entity,
        'field_name' => $field_name,
        'text' => $entity->get($field_name),
      ] + $stripped_items);
    }
    foreach ($entity->get($field_name) as $item) {
      $result = $this->getStrippedItems($item->value, $item->format);
      $stripped_items = [