Support » Plugin: WP Multilang » Array to string conversion

  • Resolved Hendrik Lersch


    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


    • get_header()
    • locate_template()
    • load_template(‘~/wp-content/themes/xxx/header.php’)
    • wpm_language_switcher()
    • wpm_get_language_switcher()
    • wpm_get_template()
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author VaLeXaR


    Hi @riddler84
    If You use language switcher witch arguments, You need change it.
    New arguments described in description to plugin.

    Thread Starter Hendrik Lersch


    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.

    Plugin Author VaLeXaR


    Judging by the error, you pass ‘$type’ as an array. But you need a string.

    • This reply was modified 5 years, 4 months ago by VaLeXaR.
    Thread Starter Hendrik Lersch


    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.