From 024a322fdbfcfb780aa0e67adcdb394bd715fe7f Mon Sep 17 00:00:00 2001 From: oskosk Date: Wed, 22 Nov 2017 14:05:52 -0300 Subject: [PATCH] Check if shortcode attributes are an array n Jetpack_Brightcove_Shortcode::normalize_attributes before assuming they can be counted --- modules/shortcodes/brightcove.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/shortcodes/brightcove.php b/modules/shortcodes/brightcove.php index 8dbc9fd5e3b71..c774c915f1713 100644 --- a/modules/shortcodes/brightcove.php +++ b/modules/shortcodes/brightcove.php @@ -56,7 +56,7 @@ static public function convert( $atts ) { * @return array */ static public function normalize_attributes( $atts ) { - if ( 1 == count( $atts ) ) { // this is the case we need to take care of. + if ( is_array( $atts ) && 1 == count( $atts ) ) { // this is the case we need to take care of. $parsed_atts = array(); $params = shortcode_new_to_old_params( $atts ); $params = apply_filters( 'brightcove_dimensions', $params );