[wp-trac] Re: [WordPress Trac] #3527: wp-includes/rss-functions.php function get_rss has a bug

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 11 03:00:23 GMT 2007


#3527: wp-includes/rss-functions.php function get_rss has a bug
---------------------+------------------------------------------------------
 Reporter:  zuzara   |        Owner:  anonymous
     Type:  defect   |       Status:  reopened 
 Priority:  low      |    Milestone:           
Component:  General  |      Version:  2.0.6    
 Severity:  minor    |   Resolution:           
 Keywords:  get_rss  |  
---------------------+------------------------------------------------------
Changes (by yskin):

  * status:  closed => reopened
  * version:  => 2.0.6
  * resolution:  worksforme =>
  * summary:  wp-include/rss-functions.php function get_rss has a bug =>
              wp-includes/rss-functions.php function get_rss
              has a bug

Comment:

 Replying to [comment:1 markjaquith]:
 > Looks fine to me in /branches/2.0/ and /trunk/

 In the end of /trunk/wp-includes/rss.php
 {{{
 function get_rss ($uri, '''$num = 5''') { // Like get posts, but for RSS
      $rss = fetch_rss($url);
      if ( $rss ) {
          $rss->items = array_slice($rss->items, 0, '''$num_items''');
          foreach ($rss->items as $item ) {
              echo "<li>\n";
              echo "<a href='$item[link]' title='$item[description]'>";
              echo htmlentities($item['title']);
              echo "</a><br />\n";
              echo "</li>\n";
          }
          return $posts;
      } else {
          return false;
      }
  }
 }}}

 $num_items should be $num.

 This is a typo bug in both 2.0.6 and 2.1

-- 
Ticket URL: <http://trac.wordpress.org/ticket/3527#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list