From c0a283fefb166e7ca09ef74898564fdd968cc2b1 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 28 Aug 2018 18:11:42 +0200 Subject: [PATCH] ensure we always return an array from `Request::getParams` Signed-off-by: Robin Appelman --- lib/private/AppFramework/Http/Request.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/private/AppFramework/Http/Request.php b/lib/private/AppFramework/Http/Request.php index 86ba884141f49..0485d178b4983 100644 --- a/lib/private/AppFramework/Http/Request.php +++ b/lib/private/AppFramework/Http/Request.php @@ -358,7 +358,7 @@ public function getParam(string $key, $default = null) { * @return array the array with all parameters */ public function getParams(): array { - return $this->parameters; + return is_array($this->parameters) ? $this->parameters : []; } /**