From 7137014901108608999aba77d514b96ef9019bf1 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sat, 11 Jul 2020 22:42:35 +0000 Subject: [PATCH] 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 --- src/wp-includes/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php index 225ad31f21..16d3a0f5d4 100644 --- a/src/wp-includes/functions.php +++ b/src/wp-includes/functions.php @@ -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; } }