Skip to content

[Console] Correct max width for ChoiceQuestion #15368

@miraage

Description

@miraage

https://github.com/symfony/Console/blob/2.7/Helper/QuestionHelper.php#L160

Here is a wrong calculation for cyrillic values.

- $width = max(array_map('strlen', array_keys($question->getChoices())));
+ $width = max(array_map('mb_strlen', array_keys($question->getChoices())));

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions