PHP Fatal error: Unsupported operand types in /var/aegir/platforms/commerce_kickstart-1.3/sites/all/modules/filefield_sources/filefield_sources.module on line 67

In filefield_sources.module around line 67 in function filefield_sources_form_field_ui_field_edit_form_alter(...)

I replaced

$form['instance']['widget']['settings'] += filefield_sources_form($instance);

with

    if (is_array($form['instance']['widget']['settings'])) {
      $form['instance']['widget']['settings'] += filefield_sources_form($instance);
    } else {
      $form['instance']['widget']['settings'] = filefield_sources_form($instance);
    }

Before PHP 5.3, array mergin was a little more relaxed...

Comments

quicksketch’s picture

Title: Unsupported operand types fatal error » Unsupported operand types fatal error on PHP 5.3 when other widget settings are not present
Status: Active » Fixed

Thanks! Committed finally.

Robin Millette’s picture

I can't find the actual commit...

quicksketch’s picture

Sorry I hadn't pushed yet. It should be there now.

Robin Millette’s picture

Got it, thanks!

Status: Fixed » Closed (fixed)

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