New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 7 호환성 개선 (진행중) #1814

merged 12 commits into from Feb 18, 2016

다시 나타난 HTTP_RAW_POST_DATA 문제 수정

  • Loading branch information...
conory authored and kijin committed Dec 18, 2015
commit dc4c22d64a5de39b677ae704e6e81177fdca91b0
@@ -201,9 +201,12 @@ function 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) {
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']))
// If content is not XML JSON, unset
if(!preg_match('/^[\<\{\[]/', $GLOBALS['HTTP_RAW_POST_DATA']) && strpos($_SERVER['CONTENT_TYPE'], 'json') === FALSE && strpos($_SERVER['HTTP_CONTENT_TYPE'], 'json') === FALSE)
ProTip! Use n and p to navigate between commits in a pull request.