diff --git a/src/wp-includes/compat.php b/src/wp-includes/compat.php index 6fe5ab37e1..b95275455c 100644 --- a/src/wp-includes/compat.php +++ b/src/wp-includes/compat.php @@ -79,6 +79,10 @@ endif; * @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' ); }