Commit 6a59e06e authored by Dan Lobelle's avatar Dan Lobelle Committed by Owen Bush
Browse files

Issue #3244975 by muriqui, owenbush: Title field missing in Event Instance -...

Issue #3244975 by muriqui, owenbush: Title field missing in Event Instance - throws PHP error with WSOD
parent deed6f07
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ class EventInstanceController extends ControllerBase implements ContainerInjecti
   */
  public function getTitle(EventInterface $eventinstance) {
    $title = '';
    try {
      $value = $eventinstance->get('title')->getValue();
      if (!empty($value[0]['value'])) {
        $title = $value[0]['value'];
@@ -108,6 +109,10 @@ class EventInstanceController extends ControllerBase implements ContainerInjecti
          $title = $value[0]['value'];
        }
      }
    }
    catch (\InvalidArgumentException $e) {
      $title = $eventinstance->getEventSeries()->label();
    }
    return $title;
  }