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/post.php

    r28677 r28712  
    47974797    if ( ! empty($meta['thumb']) ) {
    47984798        // Don't delete the thumb if another attachment uses it
    4799         if (! $wpdb->get_row( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE meta_key = '_wp_attachment_metadata' AND meta_value LIKE %s AND post_id <> %d", '%' . $meta['thumb'] . '%', $post_id)) ) {
     4799        if (! $wpdb->get_row( $wpdb->prepare( "SELECT meta_id FROM $wpdb->postmeta WHERE meta_key = '_wp_attachment_metadata' AND meta_value LIKE %s AND post_id <> %d", '%' . $wpdb->esc_like( $meta['thumb'] ) . '%', $post_id)) ) {
    48004800            $thumbfile = str_replace(basename($file), $meta['thumb'], $file);
    48014801            /** This filter is documented in wp-admin/custom-header.php */
Note: See TracChangeset for help on using the changeset viewer.