Skip to content

Commit

Permalink
Update composer and version
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianallgeier committed Dec 10, 2019
1 parent 9d2c864 commit 2d49e6b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "getkirby/cms",
"description": "The Kirby 3 core",
"version": "3.3.1",
"version": "3.3.2-rc.1",
"license": "proprietary",
"keywords": ["kirby", "cms", "core"],
"homepage": "https://getkirby.com",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions vendor/symfony/polyfill-mbstring/Mbstring.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,9 @@ public static function mb_strrpos($haystack, $needle, $offset = 0, $encoding = n
$offset = 0;
} elseif ($offset = (int) $offset) {
if ($offset < 0) {
$haystack = self::mb_substr($haystack, 0, $offset, $encoding);
if (0 > $offset += self::mb_strlen($needle)) {
$haystack = self::mb_substr($haystack, 0, $offset, $encoding);
}
$offset = 0;
} else {
$haystack = self::mb_substr($haystack, $offset, 2147483647, $encoding);
Expand All @@ -532,7 +534,7 @@ public static function mb_str_split($string, $split_length = 1, $encoding = null
return null;
}

if ($split_length < 1) {
if (1 > $split_length = (int) $split_length) {
trigger_error('The length of each segment must be greater than zero', E_USER_WARNING);

return false;
Expand All @@ -542,6 +544,10 @@ public static function mb_str_split($string, $split_length = 1, $encoding = null
$encoding = mb_internal_encoding();
}

if ('UTF-8' === $encoding = self::getEncoding($encoding)) {
return preg_split("/(.{{$split_length}})/u", $string, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
}

$result = array();
$length = mb_strlen($string, $encoding);

Expand Down Expand Up @@ -815,11 +821,16 @@ private static function getEncoding($encoding)
return self::$internalEncoding;
}

if ('UTF-8' === $encoding) {
return 'UTF-8';
}

$encoding = strtoupper($encoding);

if ('8BIT' === $encoding || 'BINARY' === $encoding) {
return 'CP850';
}

if ('UTF8' === $encoding) {
return 'UTF-8';
}
Expand Down

0 comments on commit 2d49e6b

Please sign in to comment.