• Hi

    I’m getting this warning:

    Warning: in_array() expects parameter 2 to be array, string given in /wp-includes/theme.php on line 1682

    It’s in the current_theme_supports() function of theme.php:

    current_theme_supports('post-thumbnails')
    [...]
    return in_array( $content_type, $_wp_theme_features[$feature][0] );

    $_wp_theme_features[$feature][0] is actually a string: ‘portfolio’

    How can this be resolved?

    Thanks.

Viewing 1 replies (of 1 total)
  • Thread Starter espritlibre

    (@espritlibre)

    Mmm.

    I returned false when $content_type equals to ‘product’ and the warning disappear.

    This seems to be an incompatibility issue with WooCommerce.

Viewing 1 replies (of 1 total)
  • The topic ‘Warning: in_array() expects parameter 2 to be array, string given’ is closed to new replies.