Skip to content

PR #826 kicked 'isset' check #830

@PhilippGrashoff

Description

@PhilippGrashoff

In Line 229 of src/FormField/DropDown.php:

 if (!$this->field->required && !$this->isMultiple) {

Before #826, there was an isset() check if $this->field was set:

        if (isset($this->field) && $this->field->required) {
            $this->isValueRequired = true;
        }

Now, if $this->field isnt set, it leads to a PHP notice.

Possible fix:

 if (!($this->field->required ?? false) && !$this->isMultiple) {

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions