• Resolved Hendrik Lersch

    (@riddler84)


    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

    (@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

    (@riddler84)

    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

    (@valexar)

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

    • This reply was modified 7 years ago by VaLeXaR.
    Thread Starter Hendrik Lersch

    (@riddler84)

    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.