Warning: join(): Invalid arguments passed in /home/wpcom/public_html/wp-includes/post-template.php on line 410

Description

get_body_class takes an argument passed from body_class which can be a string or an array.

This argument is during the process of the function converted into an array in all cases except when it is empty - for example an empty string.

Themes sometimes use the body_classs function passing in the only body class they care about as a string or an empty string and then use a filter to return only this and not any of the default classes.

We should therefore make sure to convert an empty string into an array as well as a string containing one or more space separated classes.

Bug has always existed since this functionality was introduced for #11878.