Closed rbackert closed 2 months ago
Issue Overview WP CLI command wp traduttore language-pack list <project> critically fails if no language packs exist for the project.
wp traduttore language-pack list <project>
To Reproduce Steps to reproduce the behavior:
Expected behavior If the project there's no last generated date, then language-pack list should show empty output in the selected --format.
language-pack list
--format
Screenshots If applicable, add screenshots to help explain your problem.
Versions
Additional context Error log:
PHP Fatal error: Uncaught Error: Call to a member function format() on null in /wp/wp-content/plugins/traduttore/inc/CLI/LanguagePackCommand.php:104 Stack trace: #0 [internal function]: Required\Traduttore\CLI\LanguagePackCommand->list(Array, Array) #1 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func(Array, Array, Array) #2 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array) #3 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(491): call_user_func(Object(Closure), Array, Array) #4 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(417): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array) #5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(440): WP_CLI\Runner->run_command(Array, Array) #6 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1237): WP_CLI\Runner->run_command_and_exit() #7 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php in /wp/wp-content/plugins/traduttore/inc/CLI/LanguagePackCommand.php on line 104
Issue Overview WP CLI command
wp traduttore language-pack list <project>
critically fails if no language packs exist for the project.To Reproduce Steps to reproduce the behavior:
wp traduttore language-pack list <project>
Expected behavior If the project there's no last generated date, then
language-pack list
should show empty output in the selected--format
.Screenshots If applicable, add screenshots to help explain your problem.
Versions
Additional context Error log: