WordPress.org

Make WordPress Core

Ticket #19779: 19779-2.diff

File 19779-2.diff, 399 bytes (added by benbalter, 6 years ago)

Slightly cleaner, wrapped the string in double quotes

  • wp-admin/includes/post.php

     
    973973}
    974974
    975975function _edit_attachments_query_helper($where) {
    976         return $where .= ' AND post_parent < 1';
     976        global $wpdb;
     977        return $where .= " AND {$wpdb->posts}.post_parent < 1";
    977978}
    978979
    979980/**