From 2604bfffbf122305c523f29cfd0fe7c9b890982b 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: https://develop.svn.wordpress.org/trunk@23373 602fd350-edb4-49c9-b593-d223f7449a82 --- 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' ); } }