From ca7068300165126f251cf8a3c5ba0c0424c58204 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 22 Aug 2016 21:10:28 +0000 Subject: [PATCH] Database: `WP_Network`, `WP_Network_Query`, and `WP_Site_Query` call `wpdb::_escape()`, thus requiring it to be `public`. It previously had no access modifier. `_` at the beginning of a method, believe it or not, does not enforce visibility constraints. See #37771. Built from https://develop.svn.wordpress.org/trunk@38314 git-svn-id: http://core.svn.wordpress.org/trunk@38255 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-includes/wp-db.php | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 426ca67bec..27451bbe34 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.7-alpha-38313'; +$wp_version = '4.7-alpha-38314'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-includes/wp-db.php b/wp-includes/wp-db.php index 868ff385ae..102deab448 100644 --- a/wp-includes/wp-db.php +++ b/wp-includes/wp-db.php @@ -1174,18 +1174,19 @@ class wpdb { * * @uses wpdb::_real_escape() * @since 2.8.0 - * @access private + * @access public * * @param string|array $data * @return string|array escaped */ - function _escape( $data ) { + public function _escape( $data ) { if ( is_array( $data ) ) { foreach ( $data as $k => $v ) { - if ( is_array($v) ) + if ( is_array( $v ) ) { $data[$k] = $this->_escape( $v ); - else + } else { $data[$k] = $this->_real_escape( $v ); + } } } else { $data = $this->_real_escape( $data );