From 48df8c3646e597738b74c73d56183005c00b4b4a Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 4 Mar 2020 12:03:32 +0000 Subject: [PATCH] General: Ensure `get_tag_regex()` always returns a string, to match the documented value. Props subrataemfluence. Fixes #45643. git-svn-id: https://develop.svn.wordpress.org/trunk@47430 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 658afaad3c..6c5184f697 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -6548,7 +6548,7 @@ function wp_auth_check( $response ) { */ function get_tag_regex( $tag ) { if ( empty( $tag ) ) { - return; + return ''; } return sprintf( '<%1$s[^<]*(?:>[\s\S]*<\/%1$s>|\s*\/>)', tag_escape( $tag ) ); }