Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
symfony/console - 5.4.3
When $message is null, this line breaks and throws warning. https://github.com/symfony/console/blob/5.4/Formatter/OutputFormatter.php#L148
$message
<?php declare(strict_types = 1); use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; final class BrokenFormatterCommand extends Command { protected static $defaultName = 'broken-formatter'; /** * @param InputInterface $input * @param OutputInterface $output * * @return int */ protected function execute(InputInterface $input, OutputInterface $output): int { $output->writeln('ok'); // fails here $output->writeln(null); return 0; } }
Change affected line to:
preg_match_all("#<(($openTagRegex) | /($closeTagRegex)?)>#ix", $message ?? '', $matches, \PREG_OFFSET_CAPTURE);
No response
The text was updated successfully, but these errors were encountered:
#45546
Sorry, something went wrong.
bug #45546 [Console] Fix null handling in formatAndWrap() (derrabus)
1765f3f
This PR was merged into the 5.4 branch. Discussion ---------- [Console] Fix null handling in formatAndWrap() | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #45544 | License | MIT | Doc PR | N/A Commits ------- 74719e7 [Console] Fix null handling in formatAndWrap()
No branches or pull requests
Symfony version(s) affected
symfony/console - 5.4.3
Description
When
$message
is null, this line breaks and throws warning.https://github.com/symfony/console/blob/5.4/Formatter/OutputFormatter.php#L148
How to reproduce
Possible Solution
Change affected line to:
Additional Context
No response
The text was updated successfully, but these errors were encountered: