We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89adee1 commit e395f63Copy full SHA for e395f63
modules/access_events/src/Plugin/Block/EventInstanceSidebar.php
@@ -26,6 +26,12 @@ public function build() {
26
$url = explode('/', $current_path);
27
$event_instance_id = is_numeric($url[2]) ? $url[2] : '';
28
$event_instance = \Drupal::entityTypeManager()->getStorage('eventinstance')->load($event_instance_id);
29
+
30
+ // Check if event instance exists before trying to get the series
31
+ if (!$event_instance) {
32
+ return [];
33
+ }
34
35
$series = $event_instance->getEventSeries();
36
$author = $series->getOwner();
37
$current_user = \Drupal::currentUser();
0 commit comments