Make WordPress Core

Ticket #18704: 18704.patch

File 18704.patch, 718 bytes (added by ericlewis, 13 years ago)
  • .php

    old new  
    806806        $show_author   = (int) $show_author;
    807807        $show_date     = (int) $show_date;
    808808
    809         if ( !$rss->get_item_quantity() ) {
     809        if ( $rss->get_item_quantity() === FALSE ) {
    810810                echo '<ul><li>' . __( 'An error has occurred; the feed is probably down. Try again later.' ) . '</li></ul>';
    811811                $rss->__destruct();
    812812                unset($rss);
    813813                return;
    814814        }
     815        else if ( $rss->get_item_quantity() == 0 ) {
     816                echo '<ul><li>' . __( 'No posts are in the feed yet.' ) . '</li></ul>';
     817                $rss->__destruct();
     818                unset($rss);
     819                return;
     820        }
    815821
    816822        echo '<ul>';
    817823        foreach ( $rss->get_items(0, $items) as $item ) {