Merged in feature/MAW-855-import-code-into-aws (pull request #2)
code import from pantheon * code import from pantheon
This commit is contained in:
@@ -656,22 +656,7 @@ class WC_API_Server {
|
||||
* @return string
|
||||
*/
|
||||
public function get_raw_data() {
|
||||
// @codingStandardsIgnoreStart
|
||||
// $HTTP_RAW_POST_DATA is deprecated on PHP 5.6.
|
||||
if ( function_exists( 'phpversion' ) && version_compare( phpversion(), '5.6', '>=' ) ) {
|
||||
return file_get_contents( 'php://input' );
|
||||
}
|
||||
|
||||
global $HTTP_RAW_POST_DATA;
|
||||
|
||||
// A bug in PHP < 5.2.2 makes $HTTP_RAW_POST_DATA not set by default,
|
||||
// but we can do it ourself.
|
||||
if ( ! isset( $HTTP_RAW_POST_DATA ) ) {
|
||||
$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
|
||||
}
|
||||
|
||||
return $HTTP_RAW_POST_DATA;
|
||||
// @codingStandardsIgnoreEnd
|
||||
return file_get_contents( 'php://input' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user