Update index.php

This commit is contained in:
Namhyeon Go 2024-02-29 17:38:49 +09:00 committed by GitHub
parent f9df624357
commit 801f18fe25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -371,9 +371,9 @@ $context = array();
$rawdata = file_get_contents('php://input');
$pos = strpos("<?xml", $rawdata);
if ($pos !== false) {
$context = json_decode($rawdata, true); // JSON-RPC 2
} else {
$context = xmlrpc_decode_request($rawdata, $method); // XML-RPC
} else {
$context = json_decode($rawdata, true); // JSON-RPC 2
}
// check is it JSON-RPC 2 (stateless)