2021-08-31 23:17:43 +02:00
|
|
|
diff --git a/flag_lists.module b/flag_lists.module
|
2021-08-31 23:26:55 +02:00
|
|
|
index cd81104..1da0c9a 100644
|
2021-08-31 23:17:43 +02:00
|
|
|
--- a/flag_lists.module
|
|
|
|
+++ b/flag_lists.module
|
2021-08-31 23:26:55 +02:00
|
|
|
@@ -240,7 +240,7 @@ function flag_lists_flag_action_access($action, FlagInterface $flag, AccountInte
|
|
|
|
$flagListsService = Drupal::service('flaglists');
|
|
|
|
$flagLists = $flagListsService->getAllFlaggingCollections();
|
|
|
|
foreach ($flagLists as $flagList) {
|
2021-08-31 23:17:43 +02:00
|
|
|
- if ($flag->id() == $flagList->getRelatedFlag()->id()) {
|
2021-08-31 23:26:55 +02:00
|
|
|
+ if ($flagList->getRelatedFlag() && $flag->id() == $flagList->getRelatedFlag()->id()) {
|
|
|
|
if ($flagList->getBaseFlag()->isGlobal()) {
|
|
|
|
// The flag list is global.
|
|
|
|
return AccessResult::allowedIfHasPermission($account,
|