Commit f9e44f24 authored by Amitai Burstein's avatar Amitai Burstein
Browse files

fix

parent e35c09e5
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ function entityreference_prepopulate_get_values($field, $instance, $flat_array =
  $settings = $instance['settings']['behaviors']['prepopulate'];

  if (!empty($settings['og_context']) && module_exists('og_context')) {
    entityreference_prepopulate_get_values_from_og_context($field, $instance, $flat_array);
    return entityreference_prepopulate_get_values_from_og_context($field, $instance, $flat_array);
  }

  return entityreference_prepopulate_get_values_from_url($field, $instance, $flat_array);
@@ -223,7 +223,9 @@ function entityreference_prepopulate_get_values_from_og_context($field, $instanc
    return;
  }

  return !$flat_array ? array('target_id' => $og_context['gid']) : $og_context['gid'];
  $items = array();
  $items[] = !$flat_array ? array('target_id' => $og_context['gid']) : $og_context['gid'];
  return $items;
}

/**