mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-06 09:34:13 +01:00
N°5122 - Update libs to new PHP requirements
This commit is contained in:
@@ -1,24 +1,30 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @see https://github.com/laminas/laminas-stdlib for the canonical source repository
|
||||
* @copyright https://github.com/laminas/laminas-stdlib/blob/master/COPYRIGHT.md
|
||||
* @license https://github.com/laminas/laminas-stdlib/blob/master/LICENSE.md New BSD License
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Laminas\Stdlib\StringWrapper;
|
||||
|
||||
use Laminas\Stdlib\Exception;
|
||||
|
||||
use function array_map;
|
||||
use function array_search;
|
||||
use function extension_loaded;
|
||||
use function mb_convert_encoding;
|
||||
use function mb_list_encodings;
|
||||
use function mb_strlen;
|
||||
use function mb_strpos;
|
||||
use function mb_substr;
|
||||
|
||||
class MbString extends AbstractStringWrapper
|
||||
{
|
||||
/**
|
||||
* List of supported character sets (upper case)
|
||||
*
|
||||
* @var null|string[]
|
||||
* @link http://php.net/manual/mbstring.supported-encodings.php
|
||||
*
|
||||
* @var null|string[]
|
||||
*/
|
||||
protected static $encodings = null;
|
||||
protected static $encodings;
|
||||
|
||||
/**
|
||||
* Get a list of supported character encodings
|
||||
@@ -115,6 +121,7 @@ class MbString extends AbstractStringWrapper
|
||||
|
||||
$fromEncoding = $reverse ? $convertEncoding : $encoding;
|
||||
$toEncoding = $reverse ? $encoding : $convertEncoding;
|
||||
return mb_convert_encoding($str, $toEncoding, $fromEncoding);
|
||||
|
||||
return mb_convert_encoding($str, $toEncoding ?? '', $fromEncoding ?? '');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user