-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Symfony version(s) affected: 4.1.4
Description
Error contains only first byte of multibyte short option
How to reproduce
composer require symfony/console:4.1.4
- Create
application.php
with simple command. Example:
#!/usr/bin/env php
<?php
require __DIR__.'/vendor/autoload.php';
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
$application = new Application();
$application->add(new class extends Command {
public function getName() {
return 'do';
}
public function execute(InputInterface $input, OutputInterface $output) {
}
});
$application->run();
./application.php do -С 10
(whereС
is Cyrillic; you can use another letter, e.g.Щ
)
Possible Solution
Use mb_substr
instead of index access in \Symfony\Component\Console\Input\ArgvInput::parseShortOptionSet
Additional context