Make WordPress Core

Ticket #53282: 53282.diff

File 53282.diff, 1.7 KB (added by SergeyBiryukov, 4 years ago)
  • src/wp-includes/functions.php

     
    68626862        static $overloaded = null;
    68636863
    68646864        if ( is_null( $overloaded ) ) {
    6865                 $overloaded = function_exists( 'mb_internal_encoding' ) && ( ini_get( 'mbstring.func_overload' ) & 2 ); // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated
     6865                if ( function_exists( 'mb_internal_encoding' )
     6866                        && ( (int) ini_get( 'mbstring.func_overload' ) & 2 ) // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated
     6867                ) {
     6868                        $overloaded = true;
     6869                } else {
     6870                        $overloaded = false;
     6871                }
    68666872        }
    68676873
    68686874        if ( false === $overloaded ) {
  • src/wp-includes/pomo/streams.php

     
    1818                 * PHP5 constructor.
    1919                 */
    2020                function __construct() {
    21                         $this->is_overloaded = ( ( ini_get( 'mbstring.func_overload' ) & 2 ) != 0 ) && function_exists( 'mb_substr' ); // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated
    22                         $this->_pos          = 0;
     21                        if ( function_exists( 'mb_substr' )
     22                                && ( (int) ini_get( 'mbstring.func_overload' ) & 2 ) // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated
     23                        ) {
     24                                $this->is_overloaded = true;
     25                        } else {
     26                                $this->is_overloaded = false;
     27                        }
     28
     29                        $this->_pos = 0;
    2330                }
    2431
    2532                /**