• Resolved fritzmtl

    (@fritzmtl)


    Hi,

    I recently migrated a multisite website that i’m working on, from the dev site to an other site for testing before doing the migration to the live site. The restoration seems to work fine, but I now get 2 warning messages from the polylang plugin.

    When I check on the other two other sites, they arent getting the error message.

    Error messages:

    Warning: array_merge(): Argument #2 is not an array in /home/myfolder/public_html/wp4/wp-content/plugins/polylang/modules/wpml/wpml-config.php on line 60

    Warning: Invalid argument supplied for foreach() in /home/myfolder/public_html/wp4/wp-content/plugins/polylang/modules/wpml/wpml-config.php on line 62
    Skip to content

    If anybody has a solution or can point me towards one.. It would be greatly appreciated.

    Regards,

    Fritz.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Chouby

    (@chouby)

    Hi,

    Are you using a multisite with all your plugins network activated and no plugin activated at site level?

    Thread Starter fritzmtl

    (@fritzmtl)

    Hi Chouby,

    Its a Mix of both, I have some plugins deactivated site wide and other actived on the network.

    Plugin Author Chouby

    (@chouby)

    That’s really strange because the argument #2 at line 60 is an array containging the list of active plugins (at site level). See https://github.com/polylang/polylang/blob/2.1.5/modules/wpml/wpml-config.php#L60
    Does replacing

    
    $plugins = array_merge( $plugins, get_option( 'active_plugins' ) );

    by

    
    $plugins = array_merge( $plugins, get_option( 'active_plugins', array() ) );

    solves the issue?

    • This reply was modified 6 years, 10 months ago by Chouby.
    Thread Starter fritzmtl

    (@fritzmtl)

    Thanks Chouby, I will try this tonight.. as my migration to the live is schedule for this weekend :).

    Regards,

    Thread Starter fritzmtl

    (@fritzmtl)

    Hi Chouby,

    Thank for the code line.. It fixed the problem.
    Can I as you what those line mean and represent and how it fixed the issue.

    Regards,

    Plugin Author Chouby

    (@chouby)

    The warning was telling that the option containing the list of plugins was not an array. This is expected if the option is empty. Indeed, in that case, the option returns false by default. I just changed the line to ask teh option to return an empty array instead of false when the list of active plugins is empty.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error after migrating a MultiSite’ is closed to new replies.