Fixed php 8.1 compatibility when using CLI --help

Xon

Well-known member
Affected version
2.2.8 Patch 1
Running the command php cmd.php list --help spews out a number of warnings (6 I think) about null being passed to various things;

Code:
ErrorException: [E_DEPRECATED] strlen(): Passing null to parameter #1 ($string) of type string is deprecated src/vendor/symfony/console/Descriptor/TextDescriptor.php:120
Generated by: Unknown account Apr 4, 2022 at 11:51 AM

#0 src/vendor/symfony/console/Descriptor/TextDescriptor.php(120): XF::handlePhpError(8192, '[E_DEPRECATED] ...', '/var/www/sites/...', 120)
#1 src/vendor/symfony/console/Descriptor/TextDescriptor.php(153): Symfony\Component\Console\Descriptor\TextDescriptor->describeInputDefinition(Object(Symfony\Component\Console\Input\InputDefinition), Array)
#2 src/vendor/symfony/console/Descriptor/Descriptor.php(52): Symfony\Component\Console\Descriptor\TextDescriptor->describeCommand(Object(Symfony\Component\Console\Command\ListCommand), Array)
#3 src/vendor/symfony/console/Helper/DescriptorHelper.php(67): Symfony\Component\Console\Descriptor\Descriptor->describe(Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Symfony\Component\Console\Command\ListCommand), Array)
#4 src/vendor/symfony/console/Command/HelpCommand.php(76): Symfony\Component\Console\Helper\DescriptorHelper->describe(Object(Symfony\Component\Console\Output\ConsoleOutput), Object(Symfony\Component\Console\Command\ListCommand), Array)
#5 src/vendor/symfony/console/Command/Command.php(255): Symfony\Component\Console\Command\HelpCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 src/vendor/symfony/console/Application.php(992): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 src/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand(Object(Symfony\Component\Console\Command\HelpCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 src/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 src/XF/Cli/Runner.php(111): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 cmd.php(16): XF\Cli\Runner->run()
#11 {main

This probably requires symfony/console being patched or updated to fix
 
Top