GENERAL: Remove magic quote functions
The path to magic quote sanity took a fun and exciting turn: PHP core removed it and WordPress updated the minimum version. For the formally external pclzip, the code is commented out to make investigating easier and in case we ever need to merge upstream (if that still exists) changes. Props ayeshrajans, jrf, jorbin. See #47783. Fixes #18322. Built from https://develop.svn.wordpress.org/trunk@46105 git-svn-id: http://core.svn.wordpress.org/trunk@45917 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -2713,10 +2713,6 @@ function untrailingslashit( $string ) {
|
||||
* @return string Returns a string escaped with slashes.
|
||||
*/
|
||||
function addslashes_gpc( $gpc ) {
|
||||
if ( get_magic_quotes_gpc() ) {
|
||||
$gpc = stripslashes( $gpc );
|
||||
}
|
||||
|
||||
return wp_slash( $gpc );
|
||||
}
|
||||
|
||||
@@ -4782,8 +4778,6 @@ function map_deep( $value, $callback ) {
|
||||
/**
|
||||
* Parses a string into variables to be stored in an array.
|
||||
*
|
||||
* Uses {@link https://secure.php.net/parse_str parse_str()} and stripslashes if
|
||||
* {@link https://secure.php.net/magic_quotes magic_quotes_gpc} is on.
|
||||
*
|
||||
* @since 2.2.1
|
||||
*
|
||||
@@ -4792,9 +4786,7 @@ function map_deep( $value, $callback ) {
|
||||
*/
|
||||
function wp_parse_str( $string, &$array ) {
|
||||
parse_str( $string, $array );
|
||||
if ( get_magic_quotes_gpc() ) {
|
||||
$array = stripslashes_deep( $array );
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the array of variables derived from a parsed string.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user