In int_meta_ahah(), a temporary array is created to be then casted to an object (the cast is repeated thrice in a if-else branch).
It would be better to directly create an object of class stdClass.

    if (is_numeric($key)) {
      // Generate the tags so we can generate the new form elements
      $tag = new stdClass;
      $tag->field = check_plain($data['field']);
      $tag->name = check_plain($data['name']);
      $tag->status = ($key == $newest-1) ? 1 : (int)isset($data['status']);
      $tag->combine = (int)isset($data['combine']);
      $tag->remove = (int)isset($data['remove']);
      if (in_array($data['field'] . ':' . $data['name'], $check)) {
        if ($key == $newest - 1) {
          $tags['new'] = $tag;
          form_set_error('local][' . $key . '][name', t('The name for this field must be unique.  Please specify a different name or change the field.'));
        } else {
          $tags[$key] = $tag;
          form_set_error('local][' . $key . '][name', t('This name has already been specified by another field for this type.  Please change or remove it or this form will not saved.'));
        }
      } else {
        $tags[$key] = (object)$tag;
        $check[] = $data['field'] . ':' . $data['name'];
      }
      unset($cache->data['metatags']['local'][$key]);
    }

Comments

fractile81’s picture

Status: Active » Fixed

I've made this change internally and it should be in the next release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.