PHP is not my strength, but I’ve highlighted the function code from DLM.php containing the error
/**
* Add Theme Compatibility
*
* @access public
* @return void
*/
public function compatibility() {
// Post thumbnail support
if ( ! current_theme_supports( 'post-thumbnails' ) ) {
add_theme_support( 'post-thumbnails' );
remove_post_type_support( 'post', 'thumbnail' );
remove_post_type_support( 'page', 'thumbnail' );
} else {
// Get current supported
$current_support = get_theme_support( 'post-thumbnails' );
// fix current support for some themes
if ( is_array( $current_support[0] ) ) {
$current_support = $current_support[0];
}
// This can be a bool or array. If array we merge our post type in, if bool ignore because it's like a global theme setting.
if ( is_array( $current_support ) ) {
add_theme_support( 'post-thumbnails', array_merge( $current_support, array( 'dlm_download' ) ) );
}
add_post_type_support( 'download', 'thumbnail' );
}
}
It looks like the indexing of $current_support[0]
in if ( is_array( $current_support[0] ) )
is throwing the error since $current_support
is apparently a type bool in the current theme? I’ve referenced the block below..
// fix current support for some themes
if ( is_array( $current_support[0] ) ) {
$current_support = $current_support[0];
}
Thanks