Bug #102360
Updated by Moritz Karbaum about 1 year ago
If I run @./vendor/bin/typo3 --raw --format=txt@ on the cli I get an exception: <pre> Uncaught TYPO3 Exception strip_tags(): Argument #1 ($string) must be of type string, null given thrown in file /var/www/html/backend/vendor/typo3/cms-core/Classes/Command/Descriptor/TextDescriptor.php in line 57 </pre> The offend line of code is: @$this->write(sprintf("%-{$width}s %s\n", $command['name'], strip_tags($command['description'])), true);@ If a 3rd party extension doesn't define a description, strip_tags won't like that. @strip_tags($command['description'] ?? '')@ should suffice. Edit: Composer Patch @cms-core-textdescriptor-description.patch@ <pre> --- a/Classes/Command/Descriptor/TextDescriptor.php +++ b/Classes/Command/Descriptor/TextDescriptor.php @@ -54,7 +54,7 @@ $width = $this->getColumnWidth(['' => ['commands' => array_keys($commands)]]); foreach ($commands as $command) { - $this->write(sprintf("%-{$width}s %s\n", $command['name'], strip_tags($command['description'])), true); + $this->write(sprintf("%-{$width}s %s\n", $command['name'], strip_tags($command['description'] ?? '')), true); } return; } </pre> @composer.patches.json@ <pre> { "patches": { "typo3/cms-core": { "typo3 CLI description": "patches/cms-core-textdescriptor-description.patch" } } } </pre>