diff --git a/wp-includes/functions.php b/wp-includes/functions.php index fc1dd011e1..6a4d3e5151 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -6862,7 +6862,13 @@ function mbstring_binary_safe_encoding( $reset = false ) { static $overloaded = null; if ( is_null( $overloaded ) ) { - $overloaded = function_exists( 'mb_internal_encoding' ) && ( ini_get( 'mbstring.func_overload' ) & 2 ); // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated + if ( function_exists( 'mb_internal_encoding' ) + && ( (int) ini_get( 'mbstring.func_overload' ) & 2 ) // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated + ) { + $overloaded = true; + } else { + $overloaded = false; + } } if ( false === $overloaded ) { diff --git a/wp-includes/pomo/streams.php b/wp-includes/pomo/streams.php index 3978d65791..a8a3755681 100644 --- a/wp-includes/pomo/streams.php +++ b/wp-includes/pomo/streams.php @@ -18,8 +18,15 @@ if ( ! class_exists( 'POMO_Reader', false ) ) : * PHP5 constructor. */ function __construct() { - $this->is_overloaded = ( ( ini_get( 'mbstring.func_overload' ) & 2 ) != 0 ) && function_exists( 'mb_substr' ); // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated - $this->_pos = 0; + if ( function_exists( 'mb_substr' ) + && ( (int) ini_get( 'mbstring.func_overload' ) & 2 ) // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated + ) { + $this->is_overloaded = true; + } else { + $this->is_overloaded = false; + } + + $this->_pos = 0; } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 9312cba50a..9f86ecbb10 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-alpha-51031'; +$wp_version = '5.8-alpha-51032'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.