Make WordPress Core

Changeset 28880


Ignore:
Timestamp:
06/28/2014 04:00:27 AM (11 years ago)
Author:
wonderboymusic
Message:

If the get_the_excerpt() is called out of bounds of a global $post, return .

Fixes #22413.

File:
1 edited

Legend:

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

    r28844 r28880  
    2828function get_the_ID() {
    2929    $post = get_post();
    30     return ! empty ( $post ) ? $post->ID : false;
     30    return ! empty( $post ) ? $post->ID : false;
    3131}
    3232
     
    342342
    343343    $post = get_post();
     344    if ( empty( $post ) ) {
     345        return '';
     346    }
    344347
    345348    if ( post_password_required() ) {
Note: See TracChangeset for help on using the changeset viewer.