Browse files

Fix for PHP 5.2.2: $HTTP_RAW_POST_DATA not populated bug:

  • Loading branch information...
1 parent bcfbd8c commit c21899e0ddf463667eb29d7fae975b1885b717fc donal72 committed Aug 2, 2007
Showing with 6 additions and 0 deletions.
  1. +6 −0 mnet/xmlrpc/server.php
View
6 mnet/xmlrpc/server.php
@@ -21,6 +21,12 @@
// Content type for output is not html:
header('Content-type: text/xml; charset=utf-8');
+// PHP 5.2.2: $HTTP_RAW_POST_DATA not populated bug:
+// http://bugs.php.net/bug.php?id=41293
+if (empty($HTTP_RAW_POST_DATA)) {
+ $HTTP_RAW_POST_DATA = file_get_contents('php://input');
+}
+
if (!empty($CFG->mnet_rpcdebug)) {
trigger_error("HTTP_RAW_POST_DATA");
trigger_error($HTTP_RAW_POST_DATA);

0 comments on commit c21899e

Please sign in to comment.