Problem/Motivation

When running a custom Functional Test which uses this module.
Exception: Warning: Undefined array key "#other_option" Drupal\select_or_other\Element\ElementBase::addSelectField()() (Line: 141) is thrown

This is because $element['#other_option'] could be undefined.

Steps to reproduce

Proposed resolution

Use nullsafety check $element['#other_option'] ?? ''

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 3533677-2.patch583 bytesskyredwang
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

skyredwang created an issue. See original summary.

skyredwang’s picture

Status: Active » Needs review
StatusFileSize
new583 bytes

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

  • ivnish committed 7904123f on 4.x
    [#3533677] feat: Exception: Warning: Undefined array key "#other_option...
ivnish’s picture

Version: 4.2.0 » 4.x-dev
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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