Bootstrap/Load: Remove special handling for REQUEST_TIME and REQUEST_TIME_FLOAT server values in wp_magic_quotes().

This was intended as a temporary fix until `add_magic_quotes()` is modified to leave non-string values untouched, which has now been done.

Follow-up to [47370], [48205].

See #48605.

git-svn-id: https://develop.svn.wordpress.org/trunk@48206 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-06-28 21:07:36 +00:00
parent e5e4f0d977
commit c4a0e190d7

View File

@@ -1008,18 +1008,6 @@ function wp_magic_quotes() {
$_COOKIE = add_magic_quotes( $_COOKIE );
$_SERVER = add_magic_quotes( $_SERVER );
/*
* Revert the type change to string for two indexes which should retain their proper type.
* Among other things, this preserves compatibility of WP with PHPUnit Code Coverage generation.
*/
if ( isset( $_SERVER['REQUEST_TIME'] ) ) {
$_SERVER['REQUEST_TIME'] = (int) $_SERVER['REQUEST_TIME'];
}
if ( isset( $_SERVER['REQUEST_TIME_FLOAT'] ) ) {
$_SERVER['REQUEST_TIME_FLOAT'] = (float) $_SERVER['REQUEST_TIME_FLOAT'];
}
// Force REQUEST to be GET + POST.
$_REQUEST = array_merge( $_GET, $_POST );
}