From e33cb11a4a1b282dda744c768882c95ff7ace57d Mon Sep 17 00:00:00 2001 From: rob1n Date: Fri, 11 May 2007 03:21:06 +0000 Subject: [PATCH] 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 --- xmlrpc.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xmlrpc.php b/xmlrpc.php index 60f2a2c25f..2b7df24610 100644 --- a/xmlrpc.php +++ b/xmlrpc.php @@ -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 '