phpcompat icon indicating copy to clipboard operation
phpcompat copied to clipboard

False positive: WooCommerce Amazon Pay Gateway

Open greguly opened this issue 6 years ago • 0 comments

This is the report:

FILE: /nas/content/live/xxx/wp-content/plugins/woocommerce-gateway-amazon-payments-advanced/includes/class-wc-amazon-payments-advanced-ipn-handler.php
------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------------------------------------------------
 142 | ERROR | Global variable '$HTTP_RAW_POST_DATA' is deprecated since PHP 5.6 and removed since PHP 7.0; Use php://input instead
 144 | ERROR | Global variable '$HTTP_RAW_POST_DATA' is deprecated since PHP 5.6 and removed since PHP 7.0; Use php://input instead
 145 | ERROR | Global variable '$HTTP_RAW_POST_DATA' is deprecated since PHP 5.6 and removed since PHP 7.0; Use php://input instead
 148 | ERROR | Global variable '$HTTP_RAW_POST_DATA' is deprecated since PHP 5.6 and removed since PHP 7.0; Use php://input instead
------------------------------------------------------------------------------------------------------------------------------------------------------------

And this is the file:

	protected function get_raw_post_data() {
142:		global $HTTP_RAW_POST_DATA;

144:		if ( ! isset( $HTTP_RAW_POST_DATA ) ) {
145:			$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
		}

148:		return $HTTP_RAW_POST_DATA;
	}

greguly avatar May 09 '18 19:05 greguly