From 6bbd25d13224bea93ada4e75f2fd1dc740ae9411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 10 Sep 2021 13:57:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http-message/Parse.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http-message/Parse.php b/http-message/Parse.php index 96a013bd..8f98b6f6 100644 --- a/http-message/Parse.php +++ b/http-message/Parse.php @@ -16,10 +16,10 @@ class Parse public static function data($content, $contentType): mixed { if (str_contains($contentType, 'json')) { - return json_encode($contentType); + return json_encode($content); } if (str_contains($contentType, 'xml')) { - return Xml::toArray($contentType); + return Xml::toArray($content); } if (str_contains($contentType, 'x-www-form-urlencoded')) { parse_str($content, $array);