Problem/Motivation

mb_substr() needs a string as first argument. When using the text format field, the first argument of mb_subsctr() is an array.

Steps to reproduce

Create a text format field with max length. Try to edit the form.

Proposed resolution

Check if value is a string, add additional array handling when needed.

Issue fork webform-3520508

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

jurgenr created an issue. See original summary.

jurgenr’s picture

Version: 6.2.x-dev » 6.3.x-dev

jurgenr changed the visibility of the branch 6.3.x to hidden.

jurgenr changed the visibility of the branch 6.3.x to active.

jurgenr changed the visibility of the branch 6.3.x to hidden.

jurgenr’s picture

StatusFileSize
new788 bytes
jrockowitz’s picture

Status: Active » Needs work

We need to know the steps required to reproduce this issue.

jrockowitz changed the visibility of the branch 6.3.x to active.

jrockowitz changed the visibility of the branch 6.3.x to hidden.

jrockowitz changed the visibility of the branch 3520508-maxlength-on-text to hidden.

  • 1df8b73d committed on 6.3.x
    Issue #3520508: Maxlength on text format field causes TypeError
    
jrockowitz’s picture

Status: Needs work » Needs review
StatusFileSize
new4.83 KB

The attached web form replicates this issue. I had to create a new MR this to be mergeable

jrockowitz’s picture

jrockowitz’s picture

Status: Needs review » Fixed

I accidently commited this to 6.3.x. it seems fine

  • 1df8b73d committed on 6.x
    Issue #3520508: Maxlength on text format field causes TypeError
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.