From f23b86d517e7812a34d4f51f7475af574bcbf8cb Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Fri, 22 Nov 2019 01:05:01 +0100
Subject: [PATCH] Fix add_magic_quotes()
Magic quotes are only relevant for string values. Anything non-string should be left untouched.
---
src/wp-includes/functions.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 3ac199e1f0..fe12e9177b 100644
a
|
b
|
function wp_removable_query_args() { |
1196 | 1196 | */ |
1197 | 1197 | function add_magic_quotes( $array ) { |
1198 | 1198 | foreach ( (array) $array as $k => $v ) { |
| 1199 | if ( ! is_string( $v ) ) { |
| 1200 | continue; |
| 1201 | } |
| 1202 | |
1199 | 1203 | if ( is_array( $v ) ) { |
1200 | 1204 | $array[ $k ] = add_magic_quotes( $v ); |
1201 | 1205 | } else { |