{"action":"created","issue":{"url":"https://api.github.com/repos/wp-cli/wp-cli/issues/1310","labels_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/1310/labels{/name}","comments_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/1310/comments","events_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/1310/events","html_url":"https://github.com/wp-cli/wp-cli/issues/1310","id":39373726,"number":1310,"title":"undefined function add_filter() and apply_filters()","user":{"login":"javiertury","id":1520320,"avatar_url":"https://avatars.githubusercontent.com/u/1520320?v=3","gravatar_id":"","url":"https://api.github.com/users/javiertury","html_url":"https://github.com/javiertury","followers_url":"https://api.github.com/users/javiertury/followers","following_url":"https://api.github.com/users/javiertury/following{/other_user}","gists_url":"https://api.github.com/users/javiertury/gists{/gist_id}","starred_url":"https://api.github.com/users/javiertury/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/javiertury/subscriptions","organizations_url":"https://api.github.com/users/javiertury/orgs","repos_url":"https://api.github.com/users/javiertury/repos","events_url":"https://api.github.com/users/javiertury/events{/privacy}","received_events_url":"https://api.github.com/users/javiertury/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-08-03T16:42:18Z","updated_at":"2015-01-28T15:31:43Z","closed_at":"2014-08-03T17:26:39Z","body":"After configuring automatic updates following http://codex.wordpress.org/Configuring_Automatic_Background_Updates using wp-cli gives the following error:\r\n<code>PHP Fatal error:  Call to undefined function add_filter() in phar:///usr/local/bin/wp/php/wp-cli.php(23) : eval()'d code on line 50</code> The same happens for apply_filters() function\r\n\r\nMy configuration is working properly with respect to wordpress itself, and yes, I've put the configuration after this line:\r\n<code>require_once( ABSPATH . 'wp-settings.php' );</code>\r\n\r\nHas wp-cli problems with the previous line? Have I misconfigured anything?\r\n\r\nThis is my custom config of wp-config.php\r\n<pre>/* That's all, stop editing! Happy blogging. */\r\n\r\n/** Absolute path to the WordPress directory. */\r\nif ( !defined('ABSPATH') )\r\n        define('ABSPATH', dirname(__FILE__) . '/');\r\n\r\n/** Sets up WordPress vars and included files. */\r\nrequire_once(ABSPATH . 'wp-settings.php');\r\n\r\ndefine( 'FORCE_SSL_LOGIN', true );\r\ndefine( 'FORCE_SSL_ADMIN', true );\r\ndefine( 'WP_AUTO_UPDATE_CORE', true );\r\nadd_filter( 'allow_major_auto_core_updates', '__return_true' );\r\nadd_filter( 'automatic_updates_is_vcs_checkout', '__return_false', 1 );\r\nadd_filter( 'auto_update_plugin', '__return_true' );\r\nadd_filter( 'auto_update_theme', '__return_true' );\r\napply_filters( 'auto_core_update_send_email', false, success, $core_update, $result );</pre>\r\n\r\nEdit: the error occurs with most commands such as <code>wp plugin list</code> but not with others e.g. <code>wp --version</code>. The version I'm using is WP-CLI 0.16.0"},"comment":{"url":"https://api.github.com/repos/wp-cli/wp-cli/issues/comments/71853852","html_url":"https://github.com/wp-cli/wp-cli/issues/1310#issuecomment-71853852","issue_url":"https://api.github.com/repos/wp-cli/wp-cli/issues/1310","id":71853852,"user":{"login":"danielbachhuber","id":36432,"avatar_url":"https://avatars.githubusercontent.com/u/36432?v=3","gravatar_id":"","url":"https://api.github.com/users/danielbachhuber","html_url":"https://github.com/danielbachhuber","followers_url":"https://api.github.com/users/danielbachhuber/followers","following_url":"https://api.github.com/users/danielbachhuber/following{/other_user}","gists_url":"https://api.github.com/users/danielbachhuber/gists{/gist_id}","starred_url":"https://api.github.com/users/danielbachhuber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielbachhuber/subscriptions","organizations_url":"https://api.github.com/users/danielbachhuber/orgs","repos_url":"https://api.github.com/users/danielbachhuber/repos","events_url":"https://api.github.com/users/danielbachhuber/events{/privacy}","received_events_url":"https://api.github.com/users/danielbachhuber/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T15:31:43Z","updated_at":"2015-01-28T15:31:43Z","body":"Created a new canonical issue for the `wp-config.php` problem #1631"}}