diff --git a/classes/context/Context.class.php b/classes/context/Context.class.php index 7f04726cb..01e46b7db 100644 --- a/classes/context/Context.class.php +++ b/classes/context/Context.class.php @@ -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)