diff --git a/wp-includes/shortcodes.php b/wp-includes/shortcodes.php index fc850460f2..55e64a1863 100644 --- a/wp-includes/shortcodes.php +++ b/wp-includes/shortcodes.php @@ -167,8 +167,8 @@ function has_shortcode( $content, $tag ) { foreach ( $matches as $shortcode ) { if ( $tag === $shortcode[2] ) { return true; - } elseif ( isset( $shortcode[5] ) && has_shortcode( $shortcode[5], $tag ) ) { - return has_shortcode( $shortcode[5], $tag ); + } elseif ( ! empty( $shortcode[5] ) && has_shortcode( $shortcode[5], $tag ) ) { + return true; } } }