Skip to content

Commit

Permalink
Helpers::buildQuery() - filter empty parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar authored and f3l1x committed Apr 30, 2020
1 parent 10c4564 commit 033d824
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Http/Utils/Helpers.php
Expand Up @@ -14,6 +14,10 @@ public static function buildQuery(array $parameters): string
return '';
}

$parameters = array_filter($parameters, static function ($value) {
return $value !== NULL && $value !== '';
});

return http_build_query($parameters, '', '&', PHP_QUERY_RFC3986);
}

Expand Down

0 comments on commit 033d824

Please sign in to comment.