Skip to content

Commit 4f5df74

Browse files
committed
always return query bag on getArray.
1 parent 8915c05 commit 4f5df74

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Dsn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ public function getBool(string $name, bool $default = null): ?bool
175175
return $this->queryBag->getBool($name, $default);
176176
}
177177

178-
public function getArray(string $name, bool $default = null): QueryBag
178+
public function getArray(string $name, array $default = []): QueryBag
179179
{
180180
return $this->queryBag->getArray($name, $default);
181181
}

QueryBag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ public function getBool(string $name, bool $default = null): ?bool
8686
throw InvalidQueryParameterTypeException::create($name, 'bool');
8787
}
8888

89-
public function getArray(string $name, bool $default = null): ?self
89+
public function getArray(string $name, array $default = []): self
9090
{
9191
if (false == array_key_exists($name, $this->query)) {
92-
return $default;
92+
return new self($default);
9393
}
9494

9595
$value = $this->query[$name];

0 commit comments

Comments
 (0)