Skip to content
Browse files

Fix for PHP version 5.2.2 where $HTTP_RAW_POST_DATA isn't set. fixes …

…#4248

git-svn-id: http://svn.automattic.com/wordpress/trunk@5445 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent e6c1899 commit f432ed648a1cfe97cf0f1fcac9fb4f4cf5db34ac rob1n committed May 11, 2007
Showing with 6 additions and 0 deletions.
  1. +6 −0 xmlrpc.php
View
6 xmlrpc.php
@@ -5,6 +5,12 @@
// 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);

0 comments on commit f432ed6

Please sign in to comment.
Something went wrong with that request. Please try again.