Title: WP-CLI error after last update
Last modified: May 8, 2017

---

# WP-CLI error after last update

 *  Resolved [Fernando Garcia Rebolledo](https://wordpress.org/support/users/fernandoaureonet/)
 * (@fernandoaureonet)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/wp-cli-error-after-last-update/)
 * Hello,
    Today I’ve updated the plugin and **it runs ok**. But after the update,
   I have a problem with WP-CLI. When I write the command “wp plugin list”, i write
   me the next error: “Catchable fatal error: Argument 1 passed to ResponsiveMenu\
   Database\Migration::__construct() must be an instance of ResponsiveMenu\Management\
   OptionManager, null given, called in /home/sar/public_html/wp-content/plugins/
   responsive-menu/migration.php on line 17 and defined in /home/sar/public_html/
   wp-content/plugins/responsive-menu/app/Database/Migration.php on line 13”
 *  Do you know what itr means?
 * Thanks for all.
    -  This topic was modified 9 years, 1 month ago by [Fernando Garcia Rebolledo](https://wordpress.org/support/users/fernandoaureonet/).

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [jkluk](https://wordpress.org/support/users/jkluk/)
 * (@jkluk)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/wp-cli-error-after-last-update/#post-9113696)
 * From what I can tell, version 3.1.1 had a slight typo in the migration.php file.
   Line 3 init should be as follows:
 * `add_action('admin_init', function() {`
 * rather than:
 * `add_action('init', function() {`
 * Changing this line resolved the errors for me.
 * Joe
 *  [Peter Featherstone](https://wordpress.org/support/users/peterfeatherstone-1/)
 * (@peterfeatherstone-1)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/wp-cli-error-after-last-update/#post-9113916)
 * Hey Joe,
 * That’s not a typo, that is purposeful as the migration scripts need to run on
   the front end if there is a new version available otherwise all sorts of issues
   can occur.
 * I’m not sure why it is causing that issue though as the OptionManager should 
   be accessible at this point.
 * I wonder if someone can give me steps to recreate the issue as WP CLI is not 
   something I have used before.
 * All the best
 * Peter
 *  [colemanedwards](https://wordpress.org/support/users/colemanedwards/)
 * (@colemanedwards)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/wp-cli-error-after-last-update/#post-9114246)
 * Hello,
 * From what I gathered the steps to reproduce are to:
 * 1) Install WordPress Site
    2) Install WP-CLI on environment using steps found
   here: [http://wp-cli.org/#installing](http://wp-cli.org/#installing) 3) Run command`
   wp plugin list` within WP site installation directory 4) Observe plugins are 
   listed 5) Run command `wp plugin install responsive-menu` 6) Run command `wp 
   plugin activate responsive-menu` 7) Run `wp plugin list` 8) Observe Fatal Error
   reported above.
 * I have tested these steps on my own installation and successfully reproduced 
   the error. This does appear to be a third-party issue and not an issue with WP-
   CLI itself.
 * Cheers!
 *  [Peter Featherstone](https://wordpress.org/support/users/peterfeatherstone-1/)
 * (@peterfeatherstone-1)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/wp-cli-error-after-last-update/#post-9114950)
 * Hey there,
 * Thanks for the heads up and useful information! I have recreated the error and
   subsequently fixed it here.
 * Can you please try the following and let me know if it fixes the issue for you
   before I add it to the next release scheduled for Friday.
 * 1. Open up the file `config/wp/services.php`
    2. Add the following on line 8 `
   global $services_428734872364;`, inserting it above the current line `$services_428734872364
   = new ResponsiveMenu\Container\Container;`
 * All the best
 * Peter
    -  This reply was modified 9 years, 1 month ago by [Peter Featherstone](https://wordpress.org/support/users/peterfeatherstone-1/).
 *  Thread Starter [Fernando Garcia Rebolledo](https://wordpress.org/support/users/fernandoaureonet/)
 * (@fernandoaureonet)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/wp-cli-error-after-last-update/#post-9116214)
 * Hi Peter,
    I’ve done the steps you wrote and.. **it runs!!**
 *  Thank you very much!!
 * Greetings,
    Fernando
 *  [Peter Featherstone](https://wordpress.org/support/users/peterfeatherstone-1/)
 * (@peterfeatherstone-1)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/wp-cli-error-after-last-update/#post-9117112)
 * Hey Fernando,
 * You are more than welcome and glad it solved it for you!
 * Peter
 *  [ross.feldman](https://wordpress.org/support/users/rossfeldman/)
 * (@rossfeldman)
 * [9 years ago](https://wordpress.org/support/topic/wp-cli-error-after-last-update/#post-9149245)
 * Hello All,
 * I wanted to come here to report the same issue with updating responsive-menu 
   over wp-cli.
 * I received the same error when I ran:
 * `wp plugin status`
 * > PHP Catchable fatal error: Argument 1 passed to ResponsiveMenu\Database\Migration::
   > __construct() must be an instance of ResponsiveMenu\Management\OptionManager,
   > null given, called in /wordpress/wp-content/plugins/responsive-menu/migration.
   > php on line 17 and defined in /wordpress/wp-content/plugins/responsive-menu/
   > app/Database/Migration.php on line 13
   >  Catchable fatal error: Argument 1 passed
   > to ResponsiveMenu\Database\Migration::__construct() must be an instance of 
   > ResponsiveMenu\Management\OptionManager, null given, called in /wordpress/wp-
   > content/plugins/responsive-menu/migration.php on line 17 and defined in /wordpress/
   > wp-content/plugins/responsive-menu/app/Database/Migration.php on line 13
 * It worked after I used [@peterfeatherstone-1](https://wordpress.org/support/users/peterfeatherstone-1/)’
   s suggestion. The only difference for me was that services.php file was not in
   the /wp-content/plugins/responsive-menu/config/wp folder but rather in the /wp-
   content/plugins/responsive-menu/config/ folder one level above.
 * Thanks for all the help and coming up with a work around!
 * Ross
 *  [Peter Featherstone](https://wordpress.org/support/users/peterfeatherstone-1/)
 * (@peterfeatherstone-1)
 * [9 years ago](https://wordpress.org/support/topic/wp-cli-error-after-last-update/#post-9149290)
 * Hi Ross,
 * Is this still not working for you as it was fixed in version 3.1.2 released last
   week?
 * Also, oops, just saw that typo above, you’re right it’s not inside the wp folder,
   it’s one level above as Ross has mentioned.
 * Please let me know.
 * Peter
 *  [ross.feldman](https://wordpress.org/support/users/rossfeldman/)
 * (@rossfeldman)
 * [9 years ago](https://wordpress.org/support/topic/wp-cli-error-after-last-update/#post-9149427)
 * Hi Peter,
 * I was updating my test site from 3.1.1 to 3.1.2 so I will let you know whenever
   3.1.3 is released and I attempt to update via wp-cli.
 * Thanks,
    Ross
 *  [Peter Featherstone](https://wordpress.org/support/users/peterfeatherstone-1/)
 * (@peterfeatherstone-1)
 * [9 years ago](https://wordpress.org/support/topic/wp-cli-error-after-last-update/#post-9149498)
 * Hi Ross,
 * Ah right, ok that makes complete sense now. I had just figured that if you are
   upgrading your plugins then it obviously means you don’t have the latest one 
   yet!
 * It’s been a long day for me so far!
 * Peter

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘WP-CLI error after last update’ is closed to new replies.

 * ![](https://ps.w.org/responsive-menu/assets/icon-256x256.png?rev=1782326)
 * [Responsive Menu - Create Mobile-Friendly Menu](https://wordpress.org/plugins/responsive-menu/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/responsive-menu/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/responsive-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/responsive-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/responsive-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/responsive-menu/reviews/)

## Tags

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

 * 10 replies
 * 5 participants
 * Last reply from: [Peter Featherstone](https://wordpress.org/support/users/peterfeatherstone-1/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/wp-cli-error-after-last-update/#post-9149498)
 * Status: resolved