Skip to content

Commit e0219b5

Browse files
author
Arif Hoque
committed
fix: mergeIfMissing function:
1 parent 13b013b commit e0219b5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Phaseolies/Http/Request.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ public function all(): ?array
599599
public function merge(array $input): self
600600
{
601601
$this->request->replace(array_merge($this->request->all(), $input));
602+
$this->input = [];
602603

603604
return $this;
604605
}

src/Phaseolies/Support/Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ protected function matchesDomain(string $domain, $request): bool
832832
$existing = $request->getRouteParams();
833833
$existing[$m[1]] = $hostMatch[1];
834834
$request->setRouteParams($existing);
835-
$request->merge([$m[1] => $hostMatch[1]]);
835+
$request->mergeIfMissing([$m[1] => $hostMatch[1]]);
836836

837837
return true;
838838
}

0 commit comments

Comments
 (0)