Make WordPress Core


Ignore:
Timestamp:
06/10/2014 12:43:32 AM (10 years ago)
Author:
wonderboymusic
Message:

Replace all uses of like_escape() with $wpdb->esc_like().

Props miqrogroove.
See #10041.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r28636 r28712  
    57655765                // ...or a string #title, a little more complicated
    57665766                $title = preg_replace('/[^a-z0-9]/i', '.', $urltest['fragment']);
    5767                 $sql = $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_title RLIKE %s", like_escape( $title ) );
     5767                $sql = $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_title RLIKE %s", $title );
    57685768                if (! ($post_ID = $wpdb->get_var($sql)) ) {
    57695769                    // returning unknown error '0' is better than die()ing
Note: See TracChangeset for help on using the changeset viewer.