Skip to content

Commit

Permalink
Set value to query if it is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
munir131 committed Jun 19, 2020
1 parent c2757d0 commit fe8c119
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ApiBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,9 @@ protected function processQueryMappings($arguments, $api, $uri): string
{
$query = [];
foreach (array_get($api, 'mappings.query', []) as $key => $value) {
$query[$key] = array_get($arguments[0], $value, '');
if (array_get($arguments[0], $value)) {
$query[$key] = array_get($arguments[0], $value, '');
}
}

if (count($query) > 0) {
Expand Down

0 comments on commit fe8c119

Please sign in to comment.