Title: Array to string conversion
Last modified: November 18, 2017

---

# Array to string conversion

 *  Resolved [Hendrik Lersch](https://wordpress.org/support/users/riddler84/)
 * (@riddler84)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/array-to-string-conversion-6/)
 * Hi,
    since the latest update only one of the two language switchers on my site
   is working. I use the function wpm_language_switcher() in the templates header.
   php and footer.php, but the one in the header doesn’t work anymore. Here’s the
   error notices and backtrace info.
 * —
 * Array to string conversion
    wp-content/plugins/wp-multilang/includes/wpm-core-
   functions.php:43 wp-content/plugins/wp-multilang/includes/wpm-core-functions.
   php:52
 * Backtrace:
    - get_header()
       wp-content/themes/xxx/single.php:1
    - locate_template()
       wp-includes/general-template.php:45
    - load_template(‘~/wp-content/themes/xxx/header.php’)
       wp-includes/template.
      php:647
    - wpm_language_switcher()
       wp-content/themes/xxx/header.php:118
    - wpm_get_language_switcher()
       wp-content/plugins/wp-multilang/includes/wpm-
      template-functions.php:101
    - wpm_get_template()
       wp-content/plugins/wp-multilang/includes/wpm-template-
      functions.php:85

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [VaLeXaR](https://wordpress.org/support/users/valexar/)
 * (@valexar)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/array-to-string-conversion-6/#post-9698507)
 * Hi [@riddler84](https://wordpress.org/support/users/riddler84/)
    If You use language
   switcher witch arguments, You need change it. New arguments described in description
   to plugin.
 *  Thread Starter [Hendrik Lersch](https://wordpress.org/support/users/riddler84/)
 * (@riddler84)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/array-to-string-conversion-6/#post-9698585)
 * Yes, i’ve changed it from the previously used array to single values. Thats the
   function how i use it after the update: `wpm_language_switcher( 'list', 'flag');`.
   
   It works in the footer but not in the header.
 *  [VaLeXaR](https://wordpress.org/support/users/valexar/)
 * (@valexar)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/array-to-string-conversion-6/#post-9698935)
 * [@riddler84](https://wordpress.org/support/users/riddler84/)
    Judging by the 
   error, you pass ‘$type’ as an array. But you need a string.
    -  This reply was modified 8 years, 6 months ago by [VaLeXaR](https://wordpress.org/support/users/valexar/).
 *  Thread Starter [Hendrik Lersch](https://wordpress.org/support/users/riddler84/)
 * (@riddler84)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/array-to-string-conversion-6/#post-9699330)
 * Well, that’s weird. I swear i copied the line above, directly out of my header.
   php template. I’ve had changed the function in both files after i read it in 
   your changelog, i’m 100% sure about it. But i just opened the file and yes.. 
   the parameters are at the same state as they were before the update, as an array.
 * Sry, for wasting your time. I’m not exactly sure, what’s happened here 😉

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Array to string conversion’ is closed to new replies.

 * ![](https://ps.w.org/wp-multilang/assets/icon-256x256.png?rev=1760406)
 * [WP Multilang - Translation and Multilingual Plugin](https://wordpress.org/plugins/wp-multilang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-multilang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-multilang/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-multilang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-multilang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-multilang/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Hendrik Lersch](https://wordpress.org/support/users/riddler84/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/array-to-string-conversion-6/#post-9699330)
 * Status: resolved