WordPress.org

Make WordPress Core

Ticket #36403: 36403-revision.diff

File 36403-revision.diff, 1.2 KB (added by andizer, 5 years ago)

Update patch

  • wp-includes/wp-db.php

    (this hunk was shorter than expected) 
    11181118         * @since 2.8.0
    11191119         * @access private
    11201120         *
    11211121         * @param  string $string to escape
    11221122         * @return string escaped
    11231123         */
    11241124        function _real_escape( $string ) {
    11251125                if ( $this->dbh ) {
    11261126                        if ( $this->use_mysqli ) {
    11271127                                return mysqli_real_escape_string( $this->dbh, $string );
     
    11331136                $class = get_class( $this );
    11341137                if ( function_exists( '__' ) ) {
    11351138                        /* translators: %s: database access abstraction class, usually wpdb or a class extending wpdb */
    1136                         _doing_it_wrong( $class, sprintf( __( '%s must set a database connection for use with escaping.' ), $class ), E_USER_NOTICE );
     1139                        _doing_it_wrong( $class, sprintf( __( '%s must set a database connection for use with escaping.' ), $class ), 3.6 );
    11371140                } else {
    1138                         _doing_it_wrong( $class, sprintf( '%s must set a database connection for use with escaping.', $class ), E_USER_NOTICE );
     1141                        _doing_it_wrong( $class, sprintf( '%s must set a database connection for use with escaping.', $class ), 3.6 );
    11391142                }
    11401143                return addslashes( $string );
    11411144        }