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
This commit is contained in:
parent
dcb0261664
commit
ca70683001
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
|
@ -1174,19 +1174,20 @@ class wpdb {
|
||||||
*
|
*
|
||||||
* @uses wpdb::_real_escape()
|
* @uses wpdb::_real_escape()
|
||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
* @access private
|
* @access public
|
||||||
*
|
*
|
||||||
* @param string|array $data
|
* @param string|array $data
|
||||||
* @return string|array escaped
|
* @return string|array escaped
|
||||||
*/
|
*/
|
||||||
function _escape( $data ) {
|
public function _escape( $data ) {
|
||||||
if ( is_array( $data ) ) {
|
if ( is_array( $data ) ) {
|
||||||
foreach ( $data as $k => $v ) {
|
foreach ( $data as $k => $v ) {
|
||||||
if ( is_array($v) )
|
if ( is_array( $v ) ) {
|
||||||
$data[$k] = $this->_escape( $v );
|
$data[$k] = $this->_escape( $v );
|
||||||
else
|
} else {
|
||||||
$data[$k] = $this->_real_escape( $v );
|
$data[$k] = $this->_real_escape( $v );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
$data = $this->_real_escape( $data );
|
$data = $this->_real_escape( $data );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue