Problem/Motivation

TypeError while trying to render item entity_uuid:node/f9130d96-4890-47db-891b-5fcb8238a792:en with view mode search_index for search index MSKCC Content: str_contains(): Argument #1 ($haystack) must be of type string, null given in str_contains() (line 79 of /var/www/html/docroot/modules/contrib/me_language_visibility/src/Plugin/paragraphs/Behavior/LanguageVisibilityBehavior.php).

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

fathershawn created an issue. See original summary.

nickolaj made their first commit to this issue’s fork.

nickolaj’s picture

Status: Active » Needs review

Cast the return value of `getRouteName()` to string before passing it to `str_contains()`, preventing the TypeError when route name is null (e.g. during search index rendering).

fathershawn’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

fathershawn’s picture

Status: Fixed » Closed (fixed)