We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

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

Developer Preview

Low's avatar
Low
407 posts
7 years ago
Low's avatar Low

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:

Notice
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.

       
Seth Barber's avatar
Seth Barber
172 posts
7 years ago
Seth Barber's avatar Seth Barber

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

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.