Skip to content

Checkbox and Radio renderer, strict check #2851

Closed
@michsk

Description

@michsk

Is there any reason we have strict checks for single values and not strict for array values?


module-backend/Block/Widget/Grid/Column/Renderer/Radio.php::render()
line 78
if (is_array($values)) {
    $checked = in_array($value, $values) ? ' checked="checked"' : '';
} else {
    $checked = $value === $this->getColumn()->getValue() ? ' checked="checked"' : '';
}

The same is used for the Checkbox renderer. Maybe just keep it strinct and use in_array($value, $values, true) to be consistent?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions