Expected string received array

Created on 6 February 2025, 2 months ago

Problem/Motivation

If you have a custom field that contains an array of data and not a string the import will fail with:

TypeError: preg_match_all(): Argument #2 ($subject) must be of type string, array given in preg_match_all() (line 65 of /var/www/html/docroot/modules/contrib/entity_share/modules/entity_share_client/src/Plugin/EntityShareClient/Processor/EmbeddedEntityImporter.php)

Proposed resolution

Check if the field is an array before passing it into the parseFormattedTextAndImport() method.

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jeffreysmattson

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024