Make WordPress Core

Changeset 375 for trunk/b2rss2.php


Ignore:
Timestamp:
09/21/2003 11:06:53 PM (23 years ago)
Author:
mikelittle
Message:

Fix to handle no (matching) posts found.
http://sourceforge.net/tracker/index.php?func=detail&aid=809176&group_id=51422&atid=463233

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/b2rss2.php

    r352 r375  
    6767    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    6868
    69     <?php $items_count = 0; foreach ($posts as $post) { start_b2(); ?>
     69    <?php $items_count = 0; if ($posts) { foreach ($posts as $post) { start_b2(); ?>
    7070    <item rdf:about="<?php permalink_single_rss() ?>">
    7171        <title><?php the_title_rss() ?></title>
     
    8787        <content:encoded><![CDATA[<?php the_content('', 0, '') ?>]]></content:encoded>
    8888    </item>
    89     <?php $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } ?>
     89    <?php $items_count++; if (($items_count == $posts_per_rss) && empty($m)) { break; } } } ?>
    9090</channel>
    9191</rss>
Note: See TracChangeset for help on using the changeset viewer.