Skip to content

Commit

Permalink
Fix rawurlencode error due to strict types
Browse files Browse the repository at this point in the history
  • Loading branch information
gmponos committed Jun 30, 2020
1 parent 081ca17 commit d47d1b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/UriTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ private static function expandMatch(array $matches, array $variables): string
$kvp = [];
foreach ($variable as $key => $var) {
if ($isAssoc) {
$key = rawurlencode($key);
$key = rawurlencode((string)$key);
$isNestedArray = is_array($var);
} else {
$isNestedArray = false;
Expand Down Expand Up @@ -187,7 +187,7 @@ private static function expandMatch(array $matches, array $variables): string
if ($value['modifier'] === ':') {
$variable = substr($variable, 0, $value['position']);
}
$expanded = rawurlencode($variable);
$expanded = rawurlencode((string)$variable);
if ($parsed['operator'] === '+' || $parsed['operator'] === '#') {
$expanded = self::decodeReserved($expanded);
}
Expand Down

0 comments on commit d47d1b0

Please sign in to comment.