Support » Fixing WordPress » function body_class not passing join param properly

  • I was going through our error log file and saw this:

    PHP Warning: join(): Invalid arguments passed in /var/www/html/oursite/wordpress/wp-includes/post-template.php on line 389

    I noticed it runs: echo ‘class=”‘ . join( ‘ ‘, get_body_class( $class ) ) . ‘”‘;

    but $class is a string ‘main’ (join only accepts an array there) and so it ends up echoing nothing or a warning if we have errors on:

    <body id =”blog”
    Warning: join(): Invalid arguments passed in /var/www/html/48-rangehood.com/wordpress/wp-includes/post-template.php on line 389
    class=””>

    I’m not sure what this is supposed to do or if it’s not programmed right or a problem in our theme is causing it (we’re using a theme we got from another developer that doesn’t work with us anymore, that’s based on the Ribbon theme).

    Can someone clue me in on if the problem is with the WordPress file or how it could be something else?

Viewing 1 replies (of 1 total)
  • esmi

    (@esmi)

    Forum Moderator

    Can you replicate the problem using the default Twenty Thirteen theme with all plugins deactivated?

Viewing 1 replies (of 1 total)
  • The topic ‘function body_class not passing join param properly’ is closed to new replies.