function search_api_et_field_update_field($field, $prior_field, $has_data) {
  if ($field['translatable'] != $prior_field['translatable']) {
    $entity_types = array_keys($field['bundles']);
    drupal_register_shutdown_function('search_api_et_shutdown_requeue_indexes', $entity_types);
  }
}

Looks like $field['bundles'] isn't always a proper array.

Comments

colan created an issue. See original summary.

colan’s picture

Status: Active » Needs review
StatusFileSize
new1.05 KB

Patch attached.

thepanz’s picture

StatusFileSize
new1011 bytes

Reworked patch attached.
Make sure to register shutdown function only if needed.

thepanz’s picture

StatusFileSize
new940 bytes

Updated patch, fixed code indentation.

  • thePanz committed 14103a6 on 7.x-2.x
    Issue #2551111 by colan, thePanz: array_keys() expects parameter 1 to be...

  • thePanz committed 458342e on 7.x-2.x
    Issue #2551111 by colan, thePanz: array_keys() expects parameter 1 to be...
thepanz’s picture

Status: Needs review » Closed (fixed)

Committed.

The last submitted patch, 2: search_api_et-array_keys_expects-2551111-2.patch, failed testing.

The last submitted patch, 3: search_api_et-array_keys_expects-2551111-3.patch, failed testing.

Status: Closed (fixed) » Needs work

The last submitted patch, 4: search_api_et-array_keys_expects-2551111-4.patch, failed testing.

thepanz’s picture

Status: Needs work » Closed (fixed)