Every developer has these all-day’er’s. What in the happenings of happenings is happening. I had it with one of my favourite tools
wp-cli something I rely on heavily for my workflow.
Clean installed, valid versions, so on.
wp list plugins returned all good. However any real writing like
wp plugin update --all failed. And the error’s are so vague:
PHP Warning: array_filter() expects parameter 1 to be array, boolean given in phar:///usr/local/bin/wp/php/WP_CLI/CommandWithUpgrade.php on line 319
Warning: array_filter() expects parameter 1 to be array, boolean given in phar:///usr/local/bin/wp/php/WP_CLI/CommandWithUpgrade.php on line 319
Error: No plugins updated.
What made matters worse: no one else seemed too of experienced this, so I had no resources online to work off of.
The problem was two-fold:
php.ini file being used (found via
wp --info) was PHP cli’s, not apache’s, so
short_open_tag wasn’t set to
On. I have many plugins that use this tag and I didn’t know about
cli having it’s own php configuration.
2) I had folders in my
plugin/ that were soft deleted (there but inaccessible) set to
chmod 700. That needed to be removed. Apparently
wp likes to read every folder therein and if it can’t it throws a fit.
I was able to discover these problems and bypass them with the
--skip-plugins flag. So if you’ve experienced anything like what I just went through, try that, and lookout for those two issues above.