aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/api.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/engine/lib/api.php b/engine/lib/api.php
index ad1503f63..213670906 100644
--- a/engine/lib/api.php
+++ b/engine/lib/api.php
@@ -822,7 +822,15 @@
{
global $GLOBALS;
- return $GLOBALS['HTTP_RAW_POST_DATA'];
+ $postdata = $GLOBALS['HTTP_RAW_POST_DATA'];
+
+ // Attempt another method to return post data (incase always_populate_raw_post_data is switched off)
+ if (!$postdata)
+ {
+ $postdata = file_get_contents('php://input');
+ }
+
+ return $postdata;
}
// PAM functions //////////////////////////////////////////////////////////////////////////