mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-19 18:32:52 +09:00
Fix regression with HTTP_RAW_POST_DATA
This commit is contained in:
parent
da0b1bad47
commit
d117147d76
1 changed files with 5 additions and 0 deletions
|
|
@ -200,8 +200,13 @@ class Context
|
|||
*/
|
||||
function init()
|
||||
{
|
||||
// fix missing HTTP_RAW_POST_DATA in PHP 5.6 and above
|
||||
if(!isset($GLOBALS['HTTP_RAW_POST_DATA']) && version_compare(PHP_VERSION, '5.6.0', '>=') === true) {
|
||||
$GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents("php://input");
|
||||
if(!preg_match('/^[<\{\[]/', $GLOBALS['HTTP_RAW_POST_DATA']))
|
||||
{
|
||||
unset($GLOBALS['HTTP_RAW_POST_DATA']);
|
||||
}
|
||||
}
|
||||
|
||||
// set context variables in $GLOBALS (to use in display handler)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue