diff --git a/src/wp-includes/compat.php b/src/wp-includes/compat.php index 6fe5ab37e17d8..b95275455ceae 100644 --- a/src/wp-includes/compat.php +++ b/src/wp-includes/compat.php @@ -79,6 +79,10 @@ function mb_substr( $str, $start, $length = null, $encoding = null ) { * @return string Extracted substring. */ function _mb_substr( $str, $start, $length = null, $encoding = null ) { + if ( null === $str ) { + return ''; + } + if ( null === $encoding ) { $encoding = get_option( 'blog_charset' ); }