diff --git a/src/Http/Request.php b/src/Http/Request.php index 4aed493..8bc285e 100644 --- a/src/Http/Request.php +++ b/src/Http/Request.php @@ -53,13 +53,13 @@ public function getParams() */ public function getQuery() { - $query = []; + $query = null; if (isset($this->params['QUERY_STRING'])) { parse_str($this->params['QUERY_STRING'], $query); } - return $query; + return $query ?: []; } /** @@ -67,7 +67,7 @@ public function getQuery() */ public function getPost() { - $post = []; + $post = null; if (isset($this->params['REQUEST_METHOD']) && isset($this->params['CONTENT_TYPE'])) { $requestMethod = $this->params['REQUEST_METHOD']; @@ -81,7 +81,7 @@ public function getPost() } } - return $post; + return $post ?: []; } /**