Skip to content

Commit

Permalink
Learnpath: Add sanity checks in the lp-specific group subscription co…
Browse files Browse the repository at this point in the history
…nfiguration page (ItemPropertyRepository) to avoid null errors - refs BT#17726
  • Loading branch information
ywarnier committed Sep 14, 2020
1 parent 800c0de commit 9229284
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -100,7 +100,10 @@ public function subscribeGroupsToItem(
if ($groupsSubscribedToItem) {
/** @var CItemProperty $itemProperty */
foreach ($groupsSubscribedToItem as $itemProperty) {
$alreadyAdded[] = $itemProperty->getGroup()->getId();
$getGroup = $itemProperty->getGroup();
if (!empty($getGroup)) {
$alreadyAdded[] = $getGroup->getId();
}
}
}

Expand Down

0 comments on commit 9229284

Please sign in to comment.