mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 06:11:35 +08:00
Fixed type in JsonParser
This commit is contained in:
@ -35,7 +35,7 @@ class JsonParser implements RequestParserInterface
|
||||
public function parse($rawBody)
|
||||
{
|
||||
try {
|
||||
return Json::encode($rawBody, $this->asArray);
|
||||
return Json::decode($rawBody, $this->asArray);
|
||||
} catch (InvalidParamException $e) {
|
||||
if ($this->throwException) {
|
||||
throw $e;
|
||||
|
@ -15,9 +15,9 @@ namespace yii\web;
|
||||
*/
|
||||
interface RequestParserInterface
|
||||
{
|
||||
/**
|
||||
* @param string $rawBody the raw HTTP request body
|
||||
* @return array parameters parsed from the request body
|
||||
*/
|
||||
/**
|
||||
* @param string $rawBody the raw HTTP request body
|
||||
* @return array parameters parsed from the request body
|
||||
*/
|
||||
public function parse($rawBody);
|
||||
}
|
||||
|
Reference in New Issue
Block a user