Ensure we have a charset before calling mb_internal_encoding(), avoiding an unnecessary (if suppressed) warning. props dfavor. fixes #23093.
git-svn-id: http://core.svn.wordpress.org/trunk@23373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
91e3f2b866
commit
2cb5fccd5c
|
@ -514,7 +514,8 @@ function wp_get_active_and_valid_plugins() {
|
||||||
*/
|
*/
|
||||||
function wp_set_internal_encoding() {
|
function wp_set_internal_encoding() {
|
||||||
if ( function_exists( 'mb_internal_encoding' ) ) {
|
if ( function_exists( 'mb_internal_encoding' ) ) {
|
||||||
if ( !@mb_internal_encoding( get_option( 'blog_charset' ) ) )
|
$charset = get_option( 'blog_charset' );
|
||||||
|
if ( ! $charset || ! @mb_internal_encoding( $charset ) )
|
||||||
mb_internal_encoding( 'UTF-8' );
|
mb_internal_encoding( 'UTF-8' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue