Prefix table name against the post_parent field in _edit_attachments_query_helper() to avoid ambiguous queries. props benbalter. fixes #19779.
git-svn-id: https://develop.svn.wordpress.org/trunk@19720 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9a6f2ac850
commit
ba219cf998
@ -973,7 +973,8 @@ function wp_edit_attachments_query( $q = false ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _edit_attachments_query_helper($where) {
|
function _edit_attachments_query_helper($where) {
|
||||||
return $where .= ' AND post_parent < 1';
|
global $wpdb;
|
||||||
|
return $where .= " AND {$wpdb->posts}.post_parent < 1";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user