Problem/Motivation

In using the External Media module, it has highlighted an error with the `getFileExtensions` method in the `WebformManagedFileBase` class which can do a `str_replace` on a `null` value because `getDefaultFileExtensions` can return `null`.

Steps to reproduce

  1. Install and enable the Webform and External Media modules
  2. Add an External Media File element to a webform
  3. When on the build page for the webform, the error should appear

Proposed resolution

The getDefaultFileExtensions returns an empty string not `null`

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
Screenshot 2023-07-03 at 17.28.05.png1.01 MBjpontet

Issue fork webform-3372040

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

jpontet created an issue. See original summary.

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

  • jrockowitz committed 021a9c14 on 6.1.x authored by jpontet
    Issue #3372040 by jpontet: Error when getDefaultFileExtensions returns...
jrockowitz’s picture

Status: Active » Fixed

  • jrockowitz committed 021a9c14 on 6.x authored by jpontet
    Issue #3372040 by jpontet: Error when getDefaultFileExtensions returns...

  • jrockowitz committed 021a9c14 on 6.2.x authored by jpontet
    Issue #3372040 by jpontet: Error when getDefaultFileExtensions returns...

Status: Fixed » Closed (fixed)

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

jpontet’s picture