Argument #1 ($string) must be of type string, array given

Created on 28 March 2023, over 1 year ago

Problem/Motivation

TypeError: substr(): Argument #1 ($string) must be of type string, array given in substr() (line 786 of /var/www/docroot/modules/contrib/webtexttool/webtexttool.module)

$command variable has command name value 'add_js'. Data property for this command is array and error is triggered.

Steps to reproduce

I am using a entity reference field to add paragraphs. When I click on the paragraphs that I selected, nothing happens and this error appears in the console.

Proposed resolution

Add check for the variable type

Remaining tasks

Review the patch

🐛 Bug report
Status

Needs review

Version

1.7

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024