Make WordPress Core

Changeset 2612


Ignore:
Timestamp:
05/18/2005 03:17:55 AM (21 years ago)
Author:
ryan
Message:

Don't attempt to trackback an empty string. Fix file path in wp_get_http_headers(). This avoids 'File does not exist' server messages when processing enclosures.

Location:
trunk/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/functions-post.php

    r2576 r2612  
    542542        $to_ping = get_to_ping($post_id);
    543543        $pinged  = get_pung($post_id);
    544 
     544        if ( empty($to_ping) )
     545                return;
    545546        if (empty($post->post_excerpt))
    546547                $excerpt = apply_filters('the_content', $post->post_content);
     
    592593        $to_ping = $wpdb->get_var("SELECT to_ping FROM $wpdb->posts WHERE ID = $post_id");
    593594        $to_ping = trim($to_ping);
    594         $to_ping = preg_split('/\s/', $to_ping);
     595        $to_ping = preg_split('/\s/', $to_ping, -1, PREG_SPLIT_NO_EMPTY);
    595596        return $to_ping;
    596597}
  • trunk/wp-includes/functions.php

    r2611 r2612  
    634634function trackback($trackback_url, $title, $excerpt, $ID) {
    635635        global $wpdb, $wp_version;
     636
     637        if (empty($trackback_url))
     638                return;
     639
    636640        $title = urlencode($title);
    637641        $excerpt = urlencode($excerpt);
     
    792796        set_time_limit( 60 );
    793797        $parts = parse_url( $url );
    794         $file  = $parts['path'] . $parts['query'];
     798        $file  = $parts['path'] . ($parts['query'] ? '?'.$parts['query'] : '');
    795799        $host  = $parts['host'];
    796800        if ( !isset( $parts['port'] ) )
Note: See TracChangeset for help on using the changeset viewer.