Skip to content

Commit

Permalink
apply urlencoding just if value is not a string
Browse files Browse the repository at this point in the history
  • Loading branch information
eschricker committed Sep 12, 2024
1 parent a40e47b commit 1df3eec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Writing/PostmanCollectionWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ protected function generateUrlObject(OutputEndpointData $endpointData): array
// See https://www.php.net/manual/en/function.parse-str.php
$query[] = [
'key' => "{$name}[$index]",
'value' => urlencode($value),
'value' => is_string($value) ? $value : urlencode($value),

Check failure on line 296 in src/Writing/PostmanCollectionWriter.php

View workflow job for this annotation

GitHub Actions / Lint code (PHP 8.1)

Parameter #1 $string of function urlencode expects string, mixed given.
'description' => strip_tags($parameterData->description),
// Default query params to disabled if they aren't required and have empty values
'disabled' => !$parameterData->required && empty($parameterData->example),
Expand Down

0 comments on commit 1df3eec

Please sign in to comment.