When using PHP 7, entity save/push fails on some complex values, causing this notice:

Notice: Array to string conversion in salesforce_mapping_property_fieldmap_push_value() (line 130 of salesforce/modules/salesforce_mapping/includes/salesforce_mapping.fieldmap_type.inc).

This is due to the introduction of Uniform Variable Syntax in PHP 7 (see "Semantic differences in existing syntax" here).

Comments

philbenson created an issue. See original summary.

aaronbauman’s picture

Version: 8.x-3.x-dev » 7.x-3.x-dev

I think you meant to file against D7.
Patches welcome, as long as they're backwards-compatible to PHP 5

philbenson’s picture

Good catch, Aaron, thanks. I updated the syntax to be compatible with PHP 5 and 7.

aaronbauman’s picture

Status: Active » Needs review

Looks good to me.
I'll leave on "Needs review" until someone can confirm.

vaish’s picture

Status: Needs review » Reviewed & tested by the community

Patch #3 solved the issue for me.

ironsizide’s picture

Patch #3 works for me as well

  • gcb committed 9125a75 on 7.x-3.x authored by philbenson
    Issue #2847510 by philbenson: Array to string conversion notice due to...
gcb’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

joegraduate’s picture

Issue tags: +PHP 7.0 (duplicate)