Title: Warning while using WP-CLI
Last modified: August 21, 2016

---

# Warning while using WP-CLI

 *  [jmslbam](https://wordpress.org/support/users/jmslbam/)
 * (@jmslbam)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/warning-while-using-wp-cli/)
 * The remove page gets called on `admin_init` while it should be call on `admin_menu`,
   right?
 * When I hook it there the warning
    `PHP Warning: Invalid argument supplied for
   foreach() in /Users/jaime/projects/new-scientist/httpdocs/wp-admin/includes/plugin.
   php on line 1290` goes away.
 * [http://wordpress.org/extend/plugins/jetpack-only-for-admins/](http://wordpress.org/extend/plugins/jetpack-only-for-admins/)

Viewing 1 replies (of 1 total)

 *  [kitchin](https://wordpress.org/support/users/kitchin/)
 * (@kitchin)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/warning-while-using-wp-cli/#post-3809136)
 * Agree, it also can break AJAX. Error reporting seems less controlled by WP_DEBUG
   in some circumstances, like AJAX. See also: [http://wordpress.org/support/topic/conflict-with-ajax-due-to-debug-warning](http://wordpress.org/support/topic/conflict-with-ajax-due-to-debug-warning)

Viewing 1 replies (of 1 total)

The topic ‘Warning while using WP-CLI’ is closed to new replies.

 * ![](https://ps.w.org/jetpack-only-for-admins/assets/icon-256x256.jpg?rev=2503604)
 * [Admins only Jetpack](https://wordpress.org/plugins/jetpack-only-for-admins/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack-only-for-admins/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack-only-for-admins/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack-only-for-admins/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack-only-for-admins/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack-only-for-admins/reviews/)

## Tags

 * [warning](https://wordpress.org/support/topic-tag/warning/)
 * [wp-cli](https://wordpress.org/support/topic-tag/wp-cli/)

 * 1 reply
 * 2 participants
 * Last reply from: [kitchin](https://wordpress.org/support/users/kitchin/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/warning-while-using-wp-cli/#post-3809136)
 * Status: not resolved