PHP error when saving a Fluid field that contains a Grid field that contains Relationships / Checkboxes

November 20, 2017 4:10am

Subscribe [2]
  • #1 / Nov 20, 2017 4:10am

    Low's avatar


    399 posts

    I created a Fluid field and added an existing Grid field and other fields to them. The Grid field contains a Relationships field and a Checkbox field. When saving the entry, I get this error:

    Array to string conversion
    ee/legacy/helpers/custom_field_helper.php, line 40
    Severity: E_NOTICE

    I checked the file in question and changed this:

    $data[$key] = str_replace(array('\\', '|'), array('\\\\', '\|'), $val);

    to this

    $data[$key] = is_array($val)
        ? encode_multi_field($val)
        : str_replace(array('\\', '|'), array('\\\\', '\|'), $val);

    …which seems to solve it.

  • #2 / Nov 20, 2017 1:34pm

    Seth Barber's avatar

    Seth Barber

    172 posts

    Thanks Low. We’ll get this fixed for the next release.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases