Fix PHP Notice: Undefined index: group in farm_group_asset_form_submit().

This commit is contained in:
Michael Stenta 2017-12-31 11:00:00 -05:00
parent b6722da8fb
commit 3e908ede51
1 changed files with 4 additions and 1 deletions

View File

@ -258,7 +258,10 @@ function farm_group_asset_form_submit(array $form, array &$form_state) {
$asset = $form_state['values']['farm_asset'];
// Load the selected groups.
$groups = farm_asset_load_multiple($form_state['values']['group']['group']);
$groups = array();
if (!empty($form_state['values']['group']['group'])) {
$groups = farm_asset_load_multiple($form_state['values']['group']['group']);
}
// If a new group needs to be created, create it and add it to the list.
if (!empty($form_state['values']['group']['create'])) {