Warning caused by unset no_edit_on_create field

Created on 17 January 2024, 9 months ago
Updated 18 January 2024, 8 months ago

Problem/Motivation

While working on the creation of Behat tests for a Media Library field, trying to open the Media browser by clicking on "Add media" causes a warning in media_library_media_modify_form_media_library_add_form_alter to trigger with "no_edit_on_create" not being set on the opener parameters array for media_library_state. This is blocking some behat tests from passing.

Proposed resolution

Change

if ($media_library_state->getOpenerParameters()['no_edit_on_create']) { 

to

if (isset($media_library_state->getOpenerParameters()['no_edit_on_create'])) { 

to check to see if the array actually has the key set.

Remaining tasks

  • Add patch file fixing warning.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇺🇸United States smurrayatwork

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024