Commit b127837b authored by Eric Duran's avatar Eric Duran
Browse files

Issue #1268972 by jghyde, ericduran: Fixed Fatal error: Unsupported operand...

Issue #1268972 by jghyde, ericduran: Fixed Fatal error: Unsupported operand types in fivestar.field.inc on line 353.
parent fe54202c
Loading
Loading
Loading
Loading
+3 −7
Changes for includes/fivestar.field.inc: 3 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -351,15 +351,11 @@ function fivestar_field_formatter_settings_form($field, $instance, $view_mode, $
  );

  if ($instance['widget']['type'] == 'exposed') {
    $entity_info = entity_get_info($instance['entity_type']);
    // Include "Default" in the list of view modes to match the ones displayed
    // to the user; see field_ui_menu().
    $view_modes = array('default' => array('label' => t('Default'))) + $entity_info['view modes'];
    $bundles = field_info_bundles($instance['entity_type']);

    // Removed entity_get_info here and simplified the text. This is not saved
    // to used here and is honestly not need it. See http://drupal.org/node/1268972
    $element['expose'] = array(
      '#type' => 'checkbox',
      '#title' => t('Expose this Fivestar field for voting in the @display display on the @type type.', array('@display' => $view_modes[$view_mode]['label'], '@type' => $bundles[$instance['bundle']]['label'])),
      '#title' => t('Expose this Fivestar field for voting on the @type type.'),
      '#default_value' => $settings['expose'],
      '#return_value' => 1
    );