• Just a heads up – Version: 1.7.12

    WARNING: wp-content/plugins/polylang/frontend/frontend-auto-translate.php:147 - Invalid argument supplied for foreach()
    require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/my-theme/single-post.php'), Post_View::render_related_see_also, Post::All, Post::query, get_posts, WP_Query->query, WP_Query->get_posts, do_action_ref_array, call_user_func_array, PLL_Frontend_Auto_Translate->pre_get_posts

    https://www.ads-software.com/plugins/polylang/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Jesse Graupmann

    (@jgraup)

    Looks like it stems from the post__not_in. If the value is just a number this loop will fail. Making sure the value is wrapped before the loop seems to help.

    if( ! is_array( $qv[$key] )) {
       $qv[$key] = array( $qv[$key] );
    }
    Plugin Author Chouby

    (@chouby)

    Hi!

    According to the codex the ‘post__not_in’ argument takes an array.

    Thread Starter Jesse Graupmann

    (@jgraup)

    Weeeeell then, thanks for finding a bug in MY code ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WARNING: frontend-auto-translate.php:147 – Invalid argument supplied for foreach’ is closed to new replies.