Skip to content

Commit fe8c119

Browse files
author
Munir Khakhi
committed
Set value to query if it is not null
1 parent c2757d0 commit fe8c119

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/ApiBuilder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,9 @@ protected function processQueryMappings($arguments, $api, $uri): string
457457
{
458458
$query = [];
459459
foreach (array_get($api, 'mappings.query', []) as $key => $value) {
460-
$query[$key] = array_get($arguments[0], $value, '');
460+
if (array_get($arguments[0], $value)) {
461+
$query[$key] = array_get($arguments[0], $value, '');
462+
}
461463
}
462464

463465
if (count($query) > 0) {

0 commit comments

Comments
 (0)