Fix for PHP version 5.2.2 where $HTTP_RAW_POST_DATA isn't set. fixes #4248
git-svn-id: https://develop.svn.wordpress.org/trunk@5445 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c213997f48
commit
e33cb11a4a
@ -5,6 +5,12 @@ define('XMLRPC_REQUEST', true);
|
||||
// Some browser-embedded clients send cookies. We don't want them.
|
||||
$_COOKIE = array();
|
||||
|
||||
// A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,
|
||||
// but we can do it ourself.
|
||||
if ( !isset( $HTTP_RAW_POST_DATA ) ) {
|
||||
$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
|
||||
}
|
||||
|
||||
# fix for mozBlog and other cases where '<?xml' isn't on the very first line
|
||||
if ( isset($HTTP_RAW_POST_DATA) )
|
||||
$HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA);
|
||||
|
Loading…
Reference in New Issue
Block a user