php_stream_rewind(SG(request_info).request_body);
SET_VAR_STRINGL("HTTP_RAW_POST_DATA", data, length);
+
+ sapi_module.sapi_error(E_DEPRECATED,
+ "Automatically populating $HTTP_RAW_POST_DATA is deprecated and "
+ "will be removed in a future version. To avoid this warning set "
+ "'always_populate_raw_post_data' to '-1' in php.ini and use the "
+ "php://input stream instead.");
}
}
}
if (PG(variables_order) &&
(strchr(PG(variables_order),'P') || strchr(PG(variables_order),'p')) &&
- !SG(headers_sent) &&
SG(request_info).request_method &&
!strcasecmp(SG(request_info).request_method, "POST")) {
sapi_module.treat_data(PARSE_POST, NULL, NULL TSRMLS_CC);
var_dump($_POST, $HTTP_RAW_POST_DATA);
?>
--EXPECT--
+Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
+
+Warning: Cannot modify header information - headers already sent in Unknown on line 0
array(3) {
["a"]=>
string(3) "ABC"
var_dump($_POST, $HTTP_RAW_POST_DATA);
?>
--EXPECT--
+Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead. in Unknown on line 0
+
+Warning: Cannot modify header information - headers already sent in Unknown on line 0
array(0) {
}
string(9) "a=1&b=ZYX"