Fix PHP warning when saving a new asset with group membership.

This commit is contained in:
Michael Stenta 2018-03-01 10:41:23 -05:00
parent 27d11fed66
commit ce20af68b4
1 changed files with 10 additions and 0 deletions

View File

@ -809,6 +809,11 @@ function farm_group_circular_membership_validate($asset_ids, $group_ids, $elemen
// circular membership.
foreach ($group_ids as $group_id) {
// If the group ID is empty, skip it.
if (empty($group_id)) {
continue;
}
// Load the group.
$group = farm_asset_load($group_id);
@ -820,6 +825,11 @@ function farm_group_circular_membership_validate($asset_ids, $group_ids, $elemen
// Iterate through the assets being assigned to the group.
foreach ($asset_ids as $asset_id) {
// If the asset ID is empty, skip it.
if (empty($asset_id)) {
continue;
}
// Load the asset.
$asset = farm_asset_load($asset_id);