From 2cb5fccd5c6b2f742829a879551349cfe03edc41 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 2 Feb 2013 02:01:29 +0000 Subject: [PATCH] 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 --- wp-includes/load.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/load.php b/wp-includes/load.php index 1742af40d0..8a949629fe 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -514,7 +514,8 @@ function wp_get_active_and_valid_plugins() { */ function wp_set_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' ); } }