Commit 67f371ca authored by git's avatar git Committed by Bálint Nagy
Browse files

Issue #2748141 by chintan4u, tormi, Sceefo: php warnings and error when MEE...

Issue #2748141 by chintan4u, tormi, Sceefo: php warnings and error when MEE setting enabled for field collection field
parent a350685f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -830,7 +830,7 @@ function _mee_process_item_value(&$item, $entity_type, $entity, $field, $delta)
  // Finally, if there was unknown client-side problem, we might not have new
  // inserted resources. We set default value for them.
  foreach ($sids as $sid) {
    if (!isset($item['mee']['resource_manager'][$sid])) {
    if (is_array($item['mee']['resource_manager']) && !isset($item['mee']['resource_manager'][$sid])) {
      $item['mee']['resource_manager'][$sid] = array('required' => FALSE, 'weight' => 0);
    }
  }
@@ -855,8 +855,10 @@ function _mee_load_resources($entity_type, $entity, $field, $delta, &$item) {
      ->execute();
  $item['mee']['resource_manager'] = array();
  $item['mee']['resource_manager'] = $result->fetchAllAssoc('atom_sid', PDO::FETCH_ASSOC);
  if (is_array($item['mee']['resource_manager']) && isset($item['mee']['resource_manager'][0])) {
    $item['mee']['resource_manager'][0] = array('weight' => 0, 'required' => FALSE);
  }
}

/**
 * Extract all copyright informations from a string.