• Resolved tomk-m

    (@tomk-m)


    I’m experiencing the same issue as explained here when creating new sites:

    https://ww.wp.xz.cn/support/topic/php-errors-when-adding-new-sites?replies=6

    But that topic is closed to replies so I’m creating a new one.

    The issue occurs when you have no plugins set to auto-activate.

    This can be fixed with the following patch:

    Index: wp-content/plugins/multisite-plugin-manager/plugin-manager.php
    ===================================================================
    --- wp-content/plugins/multisite-plugin-manager/plugin-manager.php      (revision 4036)
    +++ wp-content/plugins/multisite-plugin-manager/plugin-manager.php      (working copy)
    @@ -294,7 +294,7 @@
              require_once( ABSPATH.'wp-admin/includes/plugin.php' );
    
                    $auto_activate = (array)get_site_option('pm_auto_activate_list');
    -               if (count($auto_activate)) {
    +               if (count($auto_activate) && $auto_activate[0] != 'EMPTY') {
                    switch_to_blog($blog_id);
                activate_plugins($auto_activate, '', false); //silently activate any plugins
                restore_current_blog();

    https://ww.wp.xz.cn/plugins/multisite-plugin-manager/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘PHP errors when adding new sites’ is closed to new replies.