Make WordPress Core

Changeset 23373


Ignore:
Timestamp:
02/02/2013 02:01:29 AM (12 years ago)
Author:
nacin
Message:

Ensure we have a charset before calling mb_internal_encoding(), avoiding an unnecessary (if suppressed) warning. props dfavor. fixes #23093.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/load.php

    r22092 r23373  
    515515function wp_set_internal_encoding() {
    516516    if ( function_exists( 'mb_internal_encoding' ) ) {
    517         if ( !@mb_internal_encoding( get_option( 'blog_charset' ) ) )
     517        $charset = get_option( 'blog_charset' );
     518        if ( ! $charset || ! @mb_internal_encoding( $charset ) )
    518519            mb_internal_encoding( 'UTF-8' );
    519520    }
Note: See TracChangeset for help on using the changeset viewer.