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

CommentFileSizeAuthor
#2 webtexttool-string-check-3350848-2.patch565 bytesnikolaat

Comments

NikolaAt created an issue. See original summary.

nikolaat’s picture

StatusFileSize
new565 bytes

Here it is a patch validating the string value, that is required because of substr()

nikolaat’s picture

Status: Active » Needs review