Bootstrap/Load: Adjust the logic in add_magic_quotes() for better readability.

Follow-up to [48205].

See #48605.

git-svn-id: https://develop.svn.wordpress.org/trunk@48440 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-07-11 22:42:35 +00:00
parent a9368a89e5
commit 7137014901

View File

@ -1230,10 +1230,10 @@ function add_magic_quotes( $array ) {
foreach ( (array) $array as $k => $v ) {
if ( is_array( $v ) ) {
$array[ $k ] = add_magic_quotes( $v );
} elseif ( ! is_string( $v ) ) {
continue;
} else {
} elseif ( is_string( $v ) ) {
$array[ $k ] = addslashes( $v );
} else {
continue;
}
}