Changeset 6142

Show
Ignore:
Timestamp:
09/20/07 18:25:14 (1 year ago)
Author:
ryan
Message:

Bail if post is empty. Props mdawaffe. fixes #5019

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/link-template.php

    r6095 r6142  
    359359    global $post, $wpdb; 
    360360 
    361     if( !is_single() || is_attachment() ) 
     361    if( empty($post) || !is_single() || is_attachment() ) 
    362362        return null; 
    363363 
     
    392392    global $post, $wpdb; 
    393393 
    394     if( !is_single() || is_attachment() ) 
     394    if( empty($post) || !is_single() || is_attachment() ) 
    395395        return null; 
    396396