From 325c143bef3b53395c05382adf957cec4c4f95cc Mon Sep 17 00:00:00 2001 From: HeTao Date: Wed, 29 Jun 2022 09:51:03 +0800 Subject: [PATCH] Update HttpHelper.php fixed 201 --- src/Dybaseapi/MNS/HttpHelper.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Dybaseapi/MNS/HttpHelper.php b/src/Dybaseapi/MNS/HttpHelper.php index 51195feb6..923d98b30 100644 --- a/src/Dybaseapi/MNS/HttpHelper.php +++ b/src/Dybaseapi/MNS/HttpHelper.php @@ -58,7 +58,9 @@ public static function curl($url, $httpMethod = 'GET', $postFields = null, $head } $body = curl_exec($ch); - libxml_disable_entity_loader(); + if (\PHP_VERSION_ID < 80000) { + libxml_disable_entity_loader(true); + } $json = json_encode(simplexml_load_string($body, 'SimpleXMLElement', LIBXML_NOCDATA)); $response = new Response( curl_getinfo($ch, CURLINFO_HTTP_CODE),