Skip to content

Commit d47d1b0

Browse files
committed
Fix rawurlencode error due to strict types
1 parent 081ca17 commit d47d1b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/UriTemplate.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ private static function expandMatch(array $matches, array $variables): string
127127
$kvp = [];
128128
foreach ($variable as $key => $var) {
129129
if ($isAssoc) {
130-
$key = rawurlencode($key);
130+
$key = rawurlencode((string)$key);
131131
$isNestedArray = is_array($var);
132132
} else {
133133
$isNestedArray = false;
@@ -187,7 +187,7 @@ private static function expandMatch(array $matches, array $variables): string
187187
if ($value['modifier'] === ':') {
188188
$variable = substr($variable, 0, $value['position']);
189189
}
190-
$expanded = rawurlencode($variable);
190+
$expanded = rawurlencode((string)$variable);
191191
if ($parsed['operator'] === '+' || $parsed['operator'] === '#') {
192192
$expanded = self::decodeReserved($expanded);
193193
}

0 commit comments

Comments
 (0)