Closed grappler closed 5 years ago
Additional information provided by @swissspidy in duplicate issue #60 :
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.
The code in question is here:
Looks like the code currently doesn't check whether $available_updates
is actually set or is an array. We could add a continue
statement in that case.
@frozzare Did you forget to submit your change as a PR? 🙂
@ocean90 yeah, sorry. Did get so late last night so I forgot about this 🙂
When running the update command and there are no updates there is a PHP warning with WP-CLI 2.0.1