WordPress.org

Make WordPress Core

Ticket #5699: get_col2.diff

File get_col2.diff, 691 bytes (added by fitztrev, 10 years ago)
  • wp-includes/comment.php

     
    992992        }
    993993
    994994        // Do Trackbacks
    995         $trackbacks = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE to_ping <> '' AND post_status = 'publish'");
    996         if ( is_array($trackbacks) ) {
     995        $trackbacks = $wpdb->get_col("SELECT ID FROM $wpdb->posts WHERE to_ping <> '' AND post_status = 'publish'");
     996        if ( is_array($trackbacks) )
    997997                foreach ( $trackbacks as $trackback )
    998                         do_trackbacks($trackback->ID);
    999         }
     998                        do_trackbacks($trackback);
    1000999
    10011000        //Do Update Services/Generic Pings
    10021001        generic_ping();