From 670878cbaad1168fa4a2365a08c274e0a601c24b Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 22 Aug 2016 21:09:03 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@38314 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/wp-db.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php index 868ff385ae..102deab448 100644 --- a/src/wp-includes/wp-db.php +++ b/src/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 );