From 83fa82aceb076a944de1b697f91f349b30f61cef Mon Sep 17 00:00:00 2001 From: Klimov Paul Date: Thu, 14 Sep 2017 14:57:53 +0300 Subject: [PATCH] `Requst::getRawBody()` usage removed --- framework/web/Request.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/web/Request.php b/framework/web/Request.php index a0cb6b4..a8f7855 100644 --- a/framework/web/Request.php +++ b/framework/web/Request.php @@ -569,7 +569,7 @@ class Request extends \yii\base\Request implements RequestInterface throw new UnsupportedMediaTypeHttpException(); } $this->_bodyParams = []; - mb_parse_str($this->getRawBody(), $this->_bodyParams); + mb_parse_str($this->getBody()->__toString(), $this->_bodyParams); } } @@ -1245,7 +1245,7 @@ class Request extends \yii\base\Request implements RequestInterface /** * Returns request content-type * The Content-Type header field indicates the MIME type of the data - * contained in [[getRawBody()]] or, in the case of the HEAD method, the + * contained in [[getBody()]] or, in the case of the HEAD method, the * media type that would have been sent had the request been a GET. * For the MIME-types the user expects in response, see [[acceptableContentTypes]]. * @return string request content-type. Empty string is returned if this information is not available.