Problem/Motivation

When FieldInheritanceHooks::entityBaseFieldInfo() runs, it generates the following error:

TypeError: in_array(): Argument #2 ($haystack) must be of type array, string given in /var/www/html/web/modules/contrib/field_inheritance/src/Hook/FieldInheritanceHooks.php on line 82 #0 /var/www/html/web/modules/contrib/field_inheritance/src/Hook/FieldInheritanceHooks.php(82): in_array()

This is due to the fact that the list of included entities is imploded into a comma-separated list when saving to config but not exploded again after reading from config.

Steps to reproduce

Ensure a value is set for "field_inheritance.config:included_entities"
Execute "drush cim".
The command fails with the error above.

Proposed resolution

Explode the included_entities value into an array before calling in_array()

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#3 type_error-3539313-3.patch917 bytesanton4uk
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

byrond created an issue. See original summary.

anton4uk’s picture

StatusFileSize
new917 bytes

Fixed patch version for 3.0.1