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
This commit is contained in:
Scott Taylor 2016-08-22 21:09:03 +00:00
parent 6df9616ff6
commit 670878cbaa

View File

@ -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 );