From 5c149c17aea32d7907fa7248518f90f844125cf2 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 10 May 2010 09:02:15 +0000 Subject: [PATCH] Use correct field name in a query in do_enclose(). fixes #12074, mtdewvirus. git-svn-id: https://develop.svn.wordpress.org/trunk@14539 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/functions.php b/wp-includes/functions.php index e1b35f2e68..edbcf15a6f 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -1178,7 +1178,7 @@ function do_enclose( $content, $post_ID ) { if ( !in_array( $link_test, $post_links_temp[0] ) ) { // link no longer in post $mid = $wpdb->get_col( $wpdb->prepare("SELECT meta_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE (%s)", $post_ID, $link_test . '%') ); do_action( 'delete_postmeta', $mid ); - $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE post_id IN(%s)", implode( ',', $mid ) ) ); + $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_id IN(%s)", implode( ',', $mid ) ) ); do_action( 'deleted_postmeta', $mid ); } }