Files
piratepoet/lib/Util/Polyfills.php
Tautvidas Sipavičius 955f24e71a Load mb_strtoupper() polyfill for MP2 migration
* Load mb_strtoupper() polyfill for MP2 migration
* Add "symfony/polyfill-mbstring" as explicit dependency
* Fixate AspectMock at 2.0.1
* Generate composer.lock with PHP 5.6 to include required dependencies

[MAILPOET-1234]
2017-12-05 11:15:31 +00:00

24 lines
636 B
PHP

<?php
if(!defined('ABSPATH')) exit;
use Symfony\Polyfill\Mbstring\Mbstring as MbstringPolyfill;
if(!function_exists('mb_detect_encoding')) {
function mb_detect_encoding($str, $encodingList = null, $strict = false) {
return MbstringPolyfill::mb_detect_encoding($str, $encodingList, $strict);
}
}
if(!function_exists('mb_convert_encoding')) {
function mb_convert_encoding($s, $to, $from = null) {
return MbstringPolyfill::mb_convert_encoding($s, $to, $from);
}
}
if(!function_exists('mb_strtoupper')) {
function mb_strtoupper($s, $encoding = null) {
return MbstringPolyfill::mb_strtoupper($s, $encoding);
}
}