Upstream thephpleague/uri-src state of the touched files before 3ad4f269f2
This commit is contained in:
1 parent
2f4f2d71c4
commit
0a2c361a43
2 files changed
+2
-18
No files matched your search
@@ -19,10 +19,10 @@ use Stringable;
|
||||
|
||||
use function implode;
|
||||
use function is_array;
|
||||
use function mb_substr;
|
||||
use function preg_match;
|
||||
use function rawurlencode;
|
||||
use function str_contains;
|
||||
use function substr;
|
||||
|
||||
/**
|
||||
* Processing behavior according to the expression type operator.
|
||||
@@ -156,9 +156,7 @@ enum Operator: string
|
||||
}
|
||||
|
||||
if (':' === $varSpec->modifier) {
|
||||
// RFC 6570 Section 2.4.1: the prefix length is a count of characters, not octets,
|
||||
// so a multibyte-aware truncation is required to avoid splitting a UTF-8 character.
|
||||
$value = mb_substr($value, 0, $varSpec->position, 'UTF-8');
|
||||
$value = substr($value, 0, $varSpec->position);
|
||||
}
|
||||
|
||||
return [$this->decode($value), $this->isNamed()];
|
||||
|
||||
Reference in new issue
Block a user