aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-07-13 10:40:15 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-07-13 10:40:15 +0000
commiteb6751aaf69275c75cb7fa1382e18de0a1230b71 (patch)
tree8a8b0a2869cb96d69a85c4037f65d892b19e631c /engine
parentff67685217ee3761975cf23bf48b14f29793347e (diff)
downloadelgg-eb6751aaf69275c75cb7fa1382e18de0a1230b71.tar.gz
elgg-eb6751aaf69275c75cb7fa1382e18de0a1230b71.tar.bz2
Closes #1119: If post data not initially found then input stream is used.
git-svn-id: https://code.elgg.org/elgg/trunk@3403 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-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 //////////////////////////////////////////////////////////////////////////