From 053cbaddd4162bb3a15fc5405485eb28dee82f92 Mon Sep 17 00:00:00 2001 From: Mattias Michaux Date: Wed, 1 Jun 2016 22:26:40 +0200 Subject: [PATCH] replaced removed HTTP_RAW_POST_DATA with php input stream --- CRM/Report/Form.php | 9 +++------ extern/soap.php | 8 -------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index ccbaea07be..710a51b05e 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -4620,12 +4620,9 @@ LEFT JOIN civicrm_contact {$field['alias']} ON {$field['alias']}.id = {$this->_a // upload strictly for '.png' images $name = trim(basename(CRM_Utils_Request::retrieve('name', 'String', CRM_Core_DAO::$_nullObject, FALSE, NULL, 'GET'))); if (preg_match('/\.png$/', $name)) { - // - // POST data is usually string data, but we are passing a RAW .png - // so PHP is a bit confused and $_POST is empty. But it has saved - // the raw bits into $HTTP_RAW_POST_DATA - // - $httpRawPostData = $GLOBALS['HTTP_RAW_POST_DATA']; + + // Get the RAW .png from the input. + $httpRawPostData = file_get_contents("php://input"); // prepare the directory $config = CRM_Core_Config::singleton(); diff --git a/extern/soap.php b/extern/soap.php index 0f5bd2081a..ab8664d70a 100644 --- a/extern/soap.php +++ b/extern/soap.php @@ -25,14 +25,6 @@ +--------------------------------------------------------------------+ */ - -// Patch for CRM-3154 -if (phpversion() == "5.2.2" && - !isset($GLOBALS['HTTP_RAW_POST_DATA']) -) { - $GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents('php://input'); -} - if (defined('PANTHEON_ENVIRONMENT')) { ini_set('session.save_handler', 'files'); } -- 2.25.1