If an image field has insert enabled, but with no "enabled insert styles" selected, and with the "Default insert style" not set (Default value is Original image - just don't change it and save the settings)

When uploading an image via filefield (or editing a page with an image previously uploaded), the following errors appear:

    Warning: Illegal offset type in isset or empty in insert_element_process() (line 212 of .../sites/all/modules/contrib/insert/insert.module).
    Warning: Illegal offset type in insert_element_process() (line 213 of .../sites/all/modules/contrib/insert/insert.module).

lines 212 - 213 in the module are as follows:

    if (!isset($insert_styles[$default])) {
      $insert_styles[$default] = $default;
    }

It appears that $default is an array here:

array(
  '0' => 'image',
  );

Comments

jenlampton’s picture

Issue summary: View changes

typo

spgd01’s picture

Status: Active » Closed (duplicate)
spgd01’s picture

Issue summary: View changes

explain insert settings to reproduce