mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
Unconditionally set HTTP_RAW_POST_DATA to avoid SimpleXML warnings
This commit is contained in:
parent
41809cfb69
commit
da0b1bad47
1 changed files with 1 additions and 2 deletions
|
|
@ -201,8 +201,7 @@ class Context
|
||||||
function init()
|
function init()
|
||||||
{
|
{
|
||||||
if(!isset($GLOBALS['HTTP_RAW_POST_DATA']) && version_compare(PHP_VERSION, '5.6.0', '>=') === true) {
|
if(!isset($GLOBALS['HTTP_RAW_POST_DATA']) && version_compare(PHP_VERSION, '5.6.0', '>=') === true) {
|
||||||
if(simplexml_load_string(file_get_contents("php://input")) !== false) $GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents("php://input");
|
$GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents("php://input");
|
||||||
if(strpos($_SERVER['CONTENT_TYPE'], 'json') || strpos($_SERVER['HTTP_CONTENT_TYPE'], 'json')) $GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents("php://input");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// set context variables in $GLOBALS (to use in display handler)
|
// set context variables in $GLOBALS (to use in display handler)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue