I have a network of over a hundred sites and I try to use wp-cli to make bulk changes to many of these. Particularly to their wp_x_options table via wp --url=site.url option update
However, wp commands fail with several of my files, severely limiting the usefulness of the tool, particularly when trying to run with a list of urls | xargs wp --url={} ... because after the first failure, the rest are skipped.
The error I get is always the same:
PHP Parse error: syntax error, unexpected end of file in ... /functions.php
This error does not happen when loading the pages normally via the browser. My functions.php files are perfectly OK. Some of them don't have a closing ?> tag but that can't be the problem since many of these (lacking closing ?>) run OK with wp-cli.
Any thoughts?
WP-CLI 0.18.0 Wordpress 4.0.1 PHP 5.5.9-1ubuntu4.4 (cli) php.ini has error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT display_errors = Off