WordPress.org

Ready to get started?Download WordPress

Forums

WP MVC
code generation utility wpmvc throwing error (4 posts)

  1. kevcpu
    Member
    Posted 1 year ago #

    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/

  2. dodmax
    Member
    Posted 1 year ago #

    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?

  3. kevcpu
    Member
    Posted 1 year ago #

    I tried that and here is what prints before the error messages:

    Array
    (
    [0] => ./core/wpmvc.php
    [1] => generate
    [2] => plugin
    [3] => TestApp
    )

  4. kevcpu
    Member
    Posted 1 year ago #

    Added this to wpmvc.php file and problem solved.

    $_SERVER = array(
    "HTTP_HOST" => "http://mysite.com",
    "SERVER_NAME" => "http://mysite.com",
    "REQUEST_URI" => "/",
    "REQUEST_METHOD" => "GET"
    );

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.