Title: Error after migrating a MultiSite
Last modified: June 28, 2017

---

# Error after migrating a MultiSite

 *  Resolved [fritzmtl](https://wordpress.org/support/users/fritzmtl/)
 * (@fritzmtl)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/error-after-migrating-a-multisite/)
 * 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](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/error-after-migrating-a-multisite/#post-9272234)
 * Hi,
 * Are you using a multisite with all your plugins network activated and no plugin
   activated at site level?
 *  Thread Starter [fritzmtl](https://wordpress.org/support/users/fritzmtl/)
 * (@fritzmtl)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/error-after-migrating-a-multisite/#post-9272892)
 * Hi Chouby,
 * Its a Mix of both, I have some plugins deactivated site wide and other actived
   on the network.
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/error-after-migrating-a-multisite/#post-9273257)
 * 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](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 8 years, 11 months ago by [Chouby](https://wordpress.org/support/users/chouby/).
 *  Thread Starter [fritzmtl](https://wordpress.org/support/users/fritzmtl/)
 * (@fritzmtl)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/error-after-migrating-a-multisite/#post-9277342)
 * Thanks Chouby, I will try this tonight.. as my migration to the live is schedule
   for this weekend :).
 * Regards,
 *  Thread Starter [fritzmtl](https://wordpress.org/support/users/fritzmtl/)
 * (@fritzmtl)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/error-after-migrating-a-multisite/#post-9280681)
 * 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](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/error-after-migrating-a-multisite/#post-9283232)
 * 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.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

## Tags

 * [argument](https://wordpress.org/support/topic-tag/argument/)

 * 6 replies
 * 2 participants
 * Last reply from: [Chouby](https://wordpress.org/support/users/chouby/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/error-after-migrating-a-multisite/#post-9283232)
 * Status: resolved