Upgrade to 3.5.3.1
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
"core"
|
||||
],
|
||||
"homepage": "https://getkirby.com",
|
||||
"version": "3.5.3",
|
||||
"version": "3.5.3.1",
|
||||
"license": "proprietary",
|
||||
"authors": [
|
||||
{
|
||||
|
14
kirby/composer.lock
generated
14
kirby/composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "d4fb0f3eb259aded337afda88d20e1b0",
|
||||
"content-hash": "73d01b459246b298ff50d068f6b909af",
|
||||
"packages": [
|
||||
{
|
||||
"name": "claviska/simpleimage",
|
||||
@@ -580,16 +580,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.22.0",
|
||||
"version": "v1.22.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13"
|
||||
"reference": "5232de97ee3b75b0360528dae24e73db49566ab1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
|
||||
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1",
|
||||
"reference": "5232de97ee3b75b0360528dae24e73db49566ab1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -640,7 +640,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.0"
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -656,7 +656,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-01-07T16:49:33+00:00"
|
||||
"time": "2021-01-22T09:19:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "true/punycode",
|
||||
|
@@ -220,7 +220,7 @@ function gist(string $url, string $file = null): string
|
||||
* @param int $code
|
||||
* @return void
|
||||
*/
|
||||
function go(string $url = null, int $code = 302)
|
||||
function go(string $url = '/', int $code = 302)
|
||||
{
|
||||
die(Response::redirect($url, $code));
|
||||
}
|
||||
|
@@ -123,7 +123,7 @@ return [
|
||||
'id' => $file->id(),
|
||||
'icon' => $file->panelIcon($image),
|
||||
'image' => $image,
|
||||
'info' => $file->toString($this->info),
|
||||
'info' => $file->toString($this->info ?? false),
|
||||
'link' => $file->panelUrl(true),
|
||||
'mime' => $file->mime(),
|
||||
'parent' => $file->parent()->panelPath(),
|
||||
|
@@ -157,7 +157,7 @@ return [
|
||||
'id' => $item->id(),
|
||||
'dragText' => $item->dragText(),
|
||||
'text' => $item->toString($this->text),
|
||||
'info' => $item->toString($this->info),
|
||||
'info' => $item->toString($this->info ?? false),
|
||||
'parent' => $item->parentId(),
|
||||
'icon' => $item->panelIcon($image),
|
||||
'image' => $image,
|
||||
|
@@ -232,7 +232,7 @@
|
||||
"field.blocks.image.name": "Billede",
|
||||
"field.blocks.image.placeholder": "Vælg et billede",
|
||||
"field.blocks.image.ratio": "Størrelsesforhold",
|
||||
"field.blocks.image.url": "Image URL",
|
||||
"field.blocks.image.url": "Billede URL",
|
||||
"field.blocks.list.name": "Liste",
|
||||
"field.blocks.markdown.name": "Markdown",
|
||||
"field.blocks.markdown.label": "Tekst",
|
||||
|
@@ -232,7 +232,7 @@
|
||||
"field.blocks.image.name": "이미지",
|
||||
"field.blocks.image.placeholder": "이미지 선택",
|
||||
"field.blocks.image.ratio": "비율",
|
||||
"field.blocks.image.url": "Image URL",
|
||||
"field.blocks.image.url": "이미지 URL",
|
||||
"field.blocks.list.name": "목록",
|
||||
"field.blocks.markdown.name": "마크다운",
|
||||
"field.blocks.markdown.label": "마크다운",
|
||||
|
@@ -232,7 +232,7 @@
|
||||
"field.blocks.image.name": "Картинка",
|
||||
"field.blocks.image.placeholder": "Выберите изображение",
|
||||
"field.blocks.image.ratio": "Соотношение",
|
||||
"field.blocks.image.url": "Image URL",
|
||||
"field.blocks.image.url": "URL изображения",
|
||||
"field.blocks.list.name": "Список",
|
||||
"field.blocks.markdown.name": "Markdown",
|
||||
"field.blocks.markdown.label": "Текст",
|
||||
|
2
kirby/panel/dist/js/app.js
vendored
2
kirby/panel/dist/js/app.js
vendored
File diff suppressed because one or more lines are too long
@@ -4,6 +4,7 @@ namespace Kirby\Cache;
|
||||
|
||||
use Kirby\Toolkit\Dir;
|
||||
use Kirby\Toolkit\F;
|
||||
use Kirby\Toolkit\Str;
|
||||
|
||||
/**
|
||||
* File System Cache Driver
|
||||
@@ -68,7 +69,41 @@ class FileCache extends Cache
|
||||
*/
|
||||
protected function file(string $key): string
|
||||
{
|
||||
$file = $this->root . '/' . basename($key);
|
||||
// strip out invalid characters in each path segment
|
||||
// split by slash or backslash
|
||||
$keyParts = [];
|
||||
foreach (preg_split('#([\/\\\\])#', $key, 0, PREG_SPLIT_DELIM_CAPTURE) as $part) {
|
||||
switch ($part) {
|
||||
// forward slashes don't need special treatment
|
||||
case '/':
|
||||
break;
|
||||
|
||||
// backslashes get their own marker in the path
|
||||
// to differentiate the cache key from one with forward slashes
|
||||
case '\\':
|
||||
$keyParts[] = '_backslash';
|
||||
break;
|
||||
|
||||
// empty part means two slashes in a row;
|
||||
// special marker like for backslashes
|
||||
case '':
|
||||
$keyParts[] = '_empty';
|
||||
break;
|
||||
|
||||
// an actual path segment
|
||||
default:
|
||||
// check if the segment only contains safe characters;
|
||||
// underscores are *not* safe to guarantee uniqueness
|
||||
// as they are used in the special cases
|
||||
if (preg_match('/^[a-zA-Z0-9-]+$/', $part) === 1) {
|
||||
$keyParts[] = $part;
|
||||
} else {
|
||||
$keyParts[] = Str::slug($part) . '_' . sha1($part);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$file = $this->root . '/' . implode('/', $keyParts);
|
||||
|
||||
if (isset($this->options['extension'])) {
|
||||
return $file . '.' . $this->options['extension'];
|
||||
|
14
kirby/vendor/composer/InstalledVersions.php
vendored
14
kirby/vendor/composer/InstalledVersions.php
vendored
@@ -14,8 +14,8 @@ class InstalledVersions
|
||||
private static $installed = array (
|
||||
'root' =>
|
||||
array (
|
||||
'pretty_version' => '3.5.3',
|
||||
'version' => '3.5.3.0',
|
||||
'pretty_version' => '3.5.3.1',
|
||||
'version' => '3.5.3.1',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
@@ -44,8 +44,8 @@ private static $installed = array (
|
||||
),
|
||||
'getkirby/cms' =>
|
||||
array (
|
||||
'pretty_version' => '3.5.3',
|
||||
'version' => '3.5.3.0',
|
||||
'pretty_version' => '3.5.3.1',
|
||||
'version' => '3.5.3.1',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
@@ -132,12 +132,12 @@ private static $installed = array (
|
||||
),
|
||||
'symfony/polyfill-mbstring' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.22.0',
|
||||
'version' => '1.22.0.0',
|
||||
'pretty_version' => 'v1.22.1',
|
||||
'version' => '1.22.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'f377a3dd1fde44d37b9831d68dc8dea3ffd28e13',
|
||||
'reference' => '5232de97ee3b75b0360528dae24e73db49566ab1',
|
||||
),
|
||||
'true/punycode' =>
|
||||
array (
|
||||
|
14
kirby/vendor/composer/installed.json
vendored
14
kirby/vendor/composer/installed.json
vendored
@@ -604,17 +604,17 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.22.0",
|
||||
"version_normalized": "1.22.0.0",
|
||||
"version": "v1.22.1",
|
||||
"version_normalized": "1.22.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13"
|
||||
"reference": "5232de97ee3b75b0360528dae24e73db49566ab1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
|
||||
"reference": "f377a3dd1fde44d37b9831d68dc8dea3ffd28e13",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1",
|
||||
"reference": "5232de97ee3b75b0360528dae24e73db49566ab1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -623,7 +623,7 @@
|
||||
"suggest": {
|
||||
"ext-mbstring": "For best performance"
|
||||
},
|
||||
"time": "2021-01-07T16:49:33+00:00",
|
||||
"time": "2021-01-22T09:19:47+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@@ -667,7 +667,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.0"
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
14
kirby/vendor/composer/installed.php
vendored
14
kirby/vendor/composer/installed.php
vendored
@@ -1,8 +1,8 @@
|
||||
<?php return array (
|
||||
'root' =>
|
||||
array (
|
||||
'pretty_version' => '3.5.3',
|
||||
'version' => '3.5.3.0',
|
||||
'pretty_version' => '3.5.3.1',
|
||||
'version' => '3.5.3.1',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
@@ -31,8 +31,8 @@
|
||||
),
|
||||
'getkirby/cms' =>
|
||||
array (
|
||||
'pretty_version' => '3.5.3',
|
||||
'version' => '3.5.3.0',
|
||||
'pretty_version' => '3.5.3.1',
|
||||
'version' => '3.5.3.1',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
@@ -119,12 +119,12 @@
|
||||
),
|
||||
'symfony/polyfill-mbstring' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.22.0',
|
||||
'version' => '1.22.0.0',
|
||||
'pretty_version' => 'v1.22.1',
|
||||
'version' => '1.22.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'f377a3dd1fde44d37b9831d68dc8dea3ffd28e13',
|
||||
'reference' => '5232de97ee3b75b0360528dae24e73db49566ab1',
|
||||
),
|
||||
'true/punycode' =>
|
||||
array (
|
||||
|
@@ -12,120 +12,120 @@
|
||||
use Symfony\Polyfill\Mbstring as p;
|
||||
|
||||
if (!function_exists('mb_convert_encoding')) {
|
||||
function mb_convert_encoding(array|string $string, string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string, $to_encoding, $from_encoding); }
|
||||
function mb_convert_encoding(array|string|null $string, ?string $to_encoding, array|string|null $from_encoding = null): array|string|false { return p\Mbstring::mb_convert_encoding($string ?? '', (string) $to_encoding, $from_encoding); }
|
||||
}
|
||||
if (!function_exists('mb_decode_mimeheader')) {
|
||||
function mb_decode_mimeheader(string $string): string { return p\Mbstring::mb_decode_mimeheader($string); }
|
||||
function mb_decode_mimeheader(?string $string): string { return p\Mbstring::mb_decode_mimeheader((string) $string); }
|
||||
}
|
||||
if (!function_exists('mb_encode_mimeheader')) {
|
||||
function mb_encode_mimeheader(string $string, string $charset = null, string $transfer_encoding = null, string $newline = "\r\n", int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader($string, $charset, $transfer_encoding, $newline, $indent); }
|
||||
function mb_encode_mimeheader(?string $string, ?string $charset = null, ?string $transfer_encoding = null, ?string $newline = "\r\n", ?int $indent = 0): string { return p\Mbstring::mb_encode_mimeheader((string) $string, $charset, $transfer_encoding, (string) $newline, (int) $indent); }
|
||||
}
|
||||
if (!function_exists('mb_decode_numericentity')) {
|
||||
function mb_decode_numericentity(string $string, array $map, string $encoding = null): string { return p\Mbstring::mb_decode_numericentity($string, $map, $encoding); }
|
||||
function mb_decode_numericentity(?string $string, array $map, ?string $encoding = null): string { return p\Mbstring::mb_decode_numericentity((string) $string, $map, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_encode_numericentity')) {
|
||||
function mb_encode_numericentity(string $string, array $map, string $encoding = null, bool $hex = false): string { return p\Mbstring::mb_encode_numericentity($string, $map, $encoding, $hex); }
|
||||
function mb_encode_numericentity(?string $string, array $map, ?string $encoding = null, ?bool $hex = false): string { return p\Mbstring::mb_encode_numericentity((string) $string, $map, $encoding, (bool) $hex); }
|
||||
}
|
||||
if (!function_exists('mb_convert_case')) {
|
||||
function mb_convert_case(string $string, int $mode, string $encoding = null): string { return p\Mbstring::mb_convert_case($string, $mode, $encoding); }
|
||||
function mb_convert_case(?string $string, ?int $mode, ?string $encoding = null): string { return p\Mbstring::mb_convert_case((string) $string, (int) $mode, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_internal_encoding')) {
|
||||
function mb_internal_encoding(string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); }
|
||||
function mb_internal_encoding(?string $encoding = null): string|bool { return p\Mbstring::mb_internal_encoding($encoding); }
|
||||
}
|
||||
if (!function_exists('mb_language')) {
|
||||
function mb_language(string $language = null): string|bool { return p\Mbstring::mb_language($language); }
|
||||
function mb_language(?string $language = null): string|bool { return p\Mbstring::mb_language($language); }
|
||||
}
|
||||
if (!function_exists('mb_list_encodings')) {
|
||||
function mb_list_encodings(): array { return p\Mbstring::mb_list_encodings(); }
|
||||
}
|
||||
if (!function_exists('mb_encoding_aliases')) {
|
||||
function mb_encoding_aliases(string $encoding): array { return p\Mbstring::mb_encoding_aliases($encoding); }
|
||||
function mb_encoding_aliases(?string $encoding): array { return p\Mbstring::mb_encoding_aliases((string) $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_check_encoding')) {
|
||||
function mb_check_encoding(array|string|null $value = null, string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); }
|
||||
function mb_check_encoding(array|string|null $value = null, ?string $encoding = null): bool { return p\Mbstring::mb_check_encoding($value, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_detect_encoding')) {
|
||||
function mb_detect_encoding(string $string, array|string|null $encodings = null, bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding($string, $encodings, $strict); }
|
||||
function mb_detect_encoding(?string $string, array|string|null $encodings = null, ?bool $strict = false): string|false { return p\Mbstring::mb_detect_encoding((string) $string, $encodings, (bool) $strict); }
|
||||
}
|
||||
if (!function_exists('mb_detect_order')) {
|
||||
function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order($encoding); }
|
||||
function mb_detect_order(array|string|null $encoding = null): array|bool { return p\Mbstring::mb_detect_order((string) $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_parse_str')) {
|
||||
function mb_parse_str(string $string, &$result = array()): bool { parse_str($string, $result); }
|
||||
function mb_parse_str(?string $string, &$result = []): bool { parse_str((string) $string, $result); }
|
||||
}
|
||||
if (!function_exists('mb_strlen')) {
|
||||
function mb_strlen(string $string, string $encoding = null): int { return p\Mbstring::mb_strlen($string, $encoding); }
|
||||
function mb_strlen(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strlen((string) $string, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_strpos')) {
|
||||
function mb_strpos(string $haystack, string $needle, int $offset = 0, string $encoding = null): int|false { return p\Mbstring::mb_strpos($haystack, $needle, $offset, $encoding); }
|
||||
function mb_strpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strpos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_strtolower')) {
|
||||
function mb_strtolower(string $string, string $encoding = null): string { return p\Mbstring::mb_strtolower($string, $encoding); }
|
||||
function mb_strtolower(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtolower((string) $string, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_strtoupper')) {
|
||||
function mb_strtoupper(string $string, string $encoding = null): string { return p\Mbstring::mb_strtoupper($string, $encoding); }
|
||||
function mb_strtoupper(?string $string, ?string $encoding = null): string { return p\Mbstring::mb_strtoupper((string) $string, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_substitute_character')) {
|
||||
function mb_substitute_character(string|int|null $substitute_character = null): string|int|bool { return p\Mbstring::mb_substitute_character($substitute_character); }
|
||||
}
|
||||
if (!function_exists('mb_substr')) {
|
||||
function mb_substr(string $string, int $start, int $length = null, string $encoding = null): string { return p\Mbstring::mb_substr($string, $start, $length, $encoding); }
|
||||
function mb_substr(?string $string, ?int $start, ?int $length = null, ?string $encoding = null): string { return p\Mbstring::mb_substr((string) $string, (int) $start, $length, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_stripos')) {
|
||||
function mb_stripos(string $haystack, string $needle, int $offset = 0, string $encoding = null): int|false { return p\Mbstring::mb_stripos($haystack, $needle, $offset, $encoding); }
|
||||
function mb_stripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_stripos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_stristr')) {
|
||||
function mb_stristr(string $haystack, string $needle, bool $before_needle = false, string $encoding = null): string|false { return p\Mbstring::mb_stristr($haystack, $needle, $before_needle, $encoding); }
|
||||
function mb_stristr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_stristr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_strrchr')) {
|
||||
function mb_strrchr(string $haystack, string $needle, bool $before_needle = false, string $encoding = null): string|false { return p\Mbstring::mb_strrchr($haystack, $needle, $before_needle, $encoding); }
|
||||
function mb_strrchr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrchr((string) $haystack, (string) $needle, $before_needle, (bool) $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_strrichr')) {
|
||||
function mb_strrichr(string $haystack, string $needle, bool $before_needle = false, string $encoding = null): string|false { return p\Mbstring::mb_strrichr($haystack, $needle, $before_needle, $encoding); }
|
||||
function mb_strrichr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strrichr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_strripos')) {
|
||||
function mb_strripos(string $haystack, string $needle, int $offset = 0, string $encoding = null): int|false { return p\Mbstring::mb_strripos($haystack, $needle, $offset, $encoding); }
|
||||
function mb_strripos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strripos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_strrpos')) {
|
||||
function mb_strrpos(string $haystack, string $needle, int $offset = 0, string $encoding = null): int|false { return p\Mbstring::mb_strrpos($haystack, $needle, $offset, $encoding); }
|
||||
function mb_strrpos(?string $haystack, ?string $needle, ?int $offset = 0, ?string $encoding = null): int|false { return p\Mbstring::mb_strrpos((string) $haystack, (string) $needle, (int) $offset, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_strstr')) {
|
||||
function mb_strstr(string $haystack, string $needle, bool $before_needle = false, string $encoding = null): string|false { return p\Mbstring::mb_strstr($haystack, $needle, $before_needle, $encoding); }
|
||||
function mb_strstr(?string $haystack, ?string $needle, ?bool $before_needle = false, ?string $encoding = null): string|false { return p\Mbstring::mb_strstr((string) $haystack, (string) $needle, (bool) $before_needle, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_get_info')) {
|
||||
function mb_get_info(string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info($type); }
|
||||
function mb_get_info(?string $type = 'all'): array|string|int|false { return p\Mbstring::mb_get_info((string) $type); }
|
||||
}
|
||||
if (!function_exists('mb_http_output')) {
|
||||
function mb_http_output(string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); }
|
||||
function mb_http_output(?string $encoding = null): string|bool { return p\Mbstring::mb_http_output($encoding); }
|
||||
}
|
||||
if (!function_exists('mb_strwidth')) {
|
||||
function mb_strwidth(string $string, string $encoding = null): int { return p\Mbstring::mb_strwidth($string, $encoding); }
|
||||
function mb_strwidth(?string $string, ?string $encoding = null): int { return p\Mbstring::mb_strwidth((string) $string, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_substr_count')) {
|
||||
function mb_substr_count(string $haystack, string $needle, string $encoding = null): int { return p\Mbstring::mb_substr_count($haystack, $needle, $encoding); }
|
||||
function mb_substr_count(?string $haystack, ?string $needle, ?string $encoding = null): int { return p\Mbstring::mb_substr_count((string) $haystack, (string) $needle, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_output_handler')) {
|
||||
function mb_output_handler(string $string, int $status): string { return p\Mbstring::mb_output_handler($string, $status); }
|
||||
function mb_output_handler(?string $string, ?int $status): string { return p\Mbstring::mb_output_handler((string) $string, (int) $status); }
|
||||
}
|
||||
if (!function_exists('mb_http_input')) {
|
||||
function mb_http_input(string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); }
|
||||
function mb_http_input(?string $type = null): array|string|false { return p\Mbstring::mb_http_input($type); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_convert_variables')) {
|
||||
function mb_convert_variables(string $to_encoding, array|string $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables($to_encoding, $from_encoding, $var, ...$vars); }
|
||||
function mb_convert_variables(?string $to_encoding, array|string|null $from_encoding, mixed &$var, mixed &...$vars): string|false { return p\Mbstring::mb_convert_variables((string) $to_encoding, $from_encoding ?? '', $var, ...$vars); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_ord')) {
|
||||
function mb_ord(string $string, string $encoding = null): int|false { return p\Mbstring::mb_ord($string, $encoding); }
|
||||
function mb_ord(?string $string, ?string $encoding = null): int|false { return p\Mbstring::mb_ord((string) $string, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_chr')) {
|
||||
function mb_chr(int $codepoint, string $encoding = null): string|false { return p\Mbstring::mb_chr($codepoint, $encoding); }
|
||||
function mb_chr(?int $codepoint, ?string $encoding = null): string|false { return p\Mbstring::mb_chr((int) $codepoint, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_scrub')) {
|
||||
function mb_scrub(string $string, string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding($string, $encoding, $encoding); }
|
||||
function mb_scrub(?string $string, ?string $encoding = null): string { $encoding ??= mb_internal_encoding(); return mb_convert_encoding((string) $string, $encoding, $encoding); }
|
||||
}
|
||||
if (!function_exists('mb_str_split')) {
|
||||
function mb_str_split(string $string, int $length = 1, string $encoding = null): array { return p\Mbstring::mb_str_split($string, $length, $encoding); }
|
||||
function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); }
|
||||
}
|
||||
|
||||
if (extension_loaded('mbstring')) {
|
||||
|
Reference in New Issue
Block a user