I'm currently getting the following PHP warnings when updating language packs on a site:
PHP Warning: Invalid argument supplied for foreach() in phar:///usr/bin/wp/vendor/wp-cli/language-command/src/WP_CLI/CommandWithTranslation.php on line 95
Warning: Invalid argument supplied for foreach() in phar:///usr/bin/wp/vendor/wp-cli/language-command/src/WP_CLI/CommandWithTranslation.php on line 95
Success: Updated 0/0 translations.
I'm currently getting the following PHP warnings when updating language packs on a site:
The code in question is here:
https://github.com/wp-cli/language-command/blob/b17cdd8a56579489c1c007e69a6b30254372789c/src/WP_CLI/CommandWithTranslation.php#L88-L103
Looks like the code currently doesn't check whether
$available_updates
is actually set or is an array. We could add acontinue
statement in that case.