Commit e88df206 authored by Donal McMullan's avatar Donal McMullan
Browse files

Workaround for PHP bug: http://bugs.php.net/bug.php?id=41293 : superglobal

HTTP_RAW_POST_DATA does not get populated
parent 47f4a6fb
......@@ -55,6 +55,12 @@ header('Content-type: text/xml; charset=utf-8');
ini_set('display_errors',0);
if(!empty($errors)) throw new XmlrpcServerException('Initialization failed. Non-recoverable error.', 6000);
// 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');
}
// A singleton provides our site's SSL info
$openssl = OpenSslRepo::singleton();
$payload = $HTTP_RAW_POST_DATA;
......@@ -104,4 +110,4 @@ if($xml->getName() == 'methodCall') {
throw new XmlrpcServerException('Unrecognized XML document form: ' . var_export($xml,1), 6009);
}
?>
\ No newline at end of file
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment