8000 Fix max width for multibyte keys in choice question by marek-pietrzak-tg · Pull Request #17314 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
change [] to array() for php5.3 compatibility
  • Loading branch information
marek-pietrzak-tg committed Jan 8, 2016
commit 2188655267aa8e8f0611bef24feb09f769bbf573
2 changes: 1 addition & 1 deletion src/Symfony/Component/Console/Helper/QuestionHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected function writePrompt(OutputInterface $output, Question $question)
$message = $question->getQuestion();

if ($question instanceof ChoiceQuestion) {
$maxWidth = max(array_map([$this, 'strlen'], array_keys($question->getChoices())));
$maxWidth = max(array_map(array($this, 'strlen'), array_keys($question->getChoices())));

$messages = (array) $question->getQuestion();
foreach ($question->getChoices() as $key => $value) {
Expand Down
0