Title: [Plugin: WP MVC] code generation utility wpmvc throwing error
Last modified: August 20, 2016

---

# [Plugin: WP MVC] code generation utility wpmvc throwing error

 *  [kevcpu](https://wordpress.org/support/users/kevcpu/)
 * (@kevcpu)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-mvc-code-generation-utility-wpmvc/)
 * I am receiving the following error when I try to run the wpmvc utility.
 * Warning: array_slice() expects parameter 1 to be array, null given in ../shells/
   mvc_shell_dispatcher.php on line 42
 * [http://wordpress.org/extend/plugins/wp-mvc/](http://wordpress.org/extend/plugins/wp-mvc/)

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

 *  [dodmax](https://wordpress.org/support/users/dodmax/)
 * (@dodmax)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-mvc-code-generation-utility-wpmvc/#post-2956824)
 * Are you sure register_argc_argv is on?
    Did you try to print_r($argv) at the 
   top of core/wpmvc.php to make sure of it?
 *  Thread Starter [kevcpu](https://wordpress.org/support/users/kevcpu/)
 * (@kevcpu)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-mvc-code-generation-utility-wpmvc/#post-2956827)
 * I tried that and here is what prints before the error messages:
 * Array
    ( [0] => ./core/wpmvc.php [1] => generate [2] => plugin [3] => TestApp)
 *  Thread Starter [kevcpu](https://wordpress.org/support/users/kevcpu/)
 * (@kevcpu)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-mvc-code-generation-utility-wpmvc/#post-2956830)
 * Added this to wpmvc.php file and problem solved.
 * $_SERVER = array(
    “HTTP_HOST” => “[http://mysite.com&#8221](http://mysite.com&#8221);,“
   SERVER_NAME” => “[http://mysite.com&#8221](http://mysite.com&#8221);, “REQUEST_URI”
   => “/”, “REQUEST_METHOD” => “GET” );

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

The topic ‘[Plugin: WP MVC] code generation utility wpmvc throwing error’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-mvc_ffffff.svg)
 * [WP MVC](https://wordpress.org/plugins/wp-mvc/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mvc/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mvc/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mvc/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mvc/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mvc/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [kevcpu](https://wordpress.org/support/users/kevcpu/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-mvc-code-generation-utility-wpmvc/#post-2956830)
 * Status: not resolved