Commit fc5fe37a authored by Russell Blakeborough's avatar Russell Blakeborough Committed by Joachim Noreiko
Browse files

Issue #3291112 by russellb: Fixed errors on PHP 7.4.

parent 8a5f264d
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -417,10 +417,13 @@ function reference_option_limit_field_attach_form($entity_type, $entity, &$form,
        // @todo: Figure out what on earth should happen when we have more than one column!
        $column = $match_columns[$field_name_matching][0];

        if ($values_field_matching) {
          foreach ($values_field_matching as $delta => $item) {
            $match_values[$field_name_matching][$delta] = $item[$column];
          }
        }

      }
      else {
        // This is an initial build of the form for a new entity.
        // Rather than look at the default values in the form, where different
@@ -516,7 +519,9 @@ function reference_option_limit_field_attach_form($entity_type, $entity, &$form,
    // to get a properties array to pass to _options_prepare_options().
    $type = str_replace('options_', '', $field_instance_option_limited['widget']['type']);
    $multiple = $field_option_limited['cardinality'] > 1 || $field_option_limited['cardinality'] == FIELD_CARDINALITY_UNLIMITED;
    $required = $element_limited[LANGUAGE_NONE]['#required'];

    $required = $element_limited[LANGUAGE_NONE]['#required'] ?? FALSE;

    $has_value = TRUE; // isset($items[0][$value_key]); ?????
    $properties = _options_properties($type, $multiple, $required, $has_value);