WP-CLI error

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #23994

    I have done next steps:
    1) installed WP via WP-CLI
    2) moved agile folder to wp-content/themes/
    3) activated Agile theme
    4) home page works fine with new theme applied

    After that steps I launched wp help from wp root directory and got FATAL error:
    Warning: array_key_exists() expects parameter 2 to be array, null given in D:\PHP Projects\wordpress
    \wp-content\themes\agile\framework\functions\page-customization.php on line 134
    Fatal error: Call to a member function get_theme_option() on null in D:\PHP Projects\wordpress\wp-co
    ntent\themes\agile\framework\functions\page-customization.php on line 137

    Any wp-cli command gives that error.

    I had to move my wp on production ASAP and a can’t sine wp search-replace does not work.
    Please help me.


    Can you pls share a temp login to your site here as a private msg ?


    No I can’t.
    But you can reproduce error following steps I described in previous message.


    Have you managed with error reproduction?


    We have had this issue with WP-CLI since it does not initialize the theme right. Pls give me few hours and I will get back to you with a resolution. Thanks.


    I’m waiting for your resolution.
    Thank you for help and for your understanding.


    Just add this line to the top of functions.php at line number 16 –

    global $theme_cache, $options_cache, $mo_theme;

    and WP-CLI should work fine.

    Related to the long discussion in this issue – https://github.com/wp-cli/wp-cli/issues/2289

    We will issue an update next week with the above change for Agile and hence this change won’t be required in future updates.


    Thank you. It works!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘WP-CLI error’ is closed to new replies.