Make WordPress Core

Changeset 38314


Ignore:
Timestamp:
08/22/2016 09:09:03 PM (10 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/wp-db.php

    r38289 r38314  
    11751175         * @uses wpdb::_real_escape()
    11761176         * @since  2.8.0
    1177          * @access private
     1177         * @access public
    11781178         *
    11791179         * @param  string|array $data
    11801180         * @return string|array escaped
    11811181         */
    1182         function _escape( $data ) {
     1182        public function _escape( $data ) {
    11831183                if ( is_array( $data ) ) {
    11841184                        foreach ( $data as $k => $v ) {
    1185                                 if ( is_array($v) )
     1185                                if ( is_array( $v ) ) {
    11861186                                        $data[$k] = $this->_escape( $v );
    1187                                 else
     1187                                } else {
    11881188                                        $data[$k] = $this->_real_escape( $v );
     1189                                }
    11891190                        }
    11901191                } else {
Note: See TracChangeset for help on using the changeset viewer.