ensure we always return an array from `Request::getParams`

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2018-08-28 18:11:42 +02:00
parent c6b1c21b8f
commit c0a283fefb
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
1 changed files with 1 additions and 1 deletions

View File

@ -358,7 +358,7 @@ class Request implements \ArrayAccess, \Countable, IRequest {
* @return array the array with all parameters
*/
public function getParams(): array {
return $this->parameters;
return is_array($this->parameters) ? $this->parameters : [];
}
/**