#30693 closed defect (bug) (wontfix)
feed-rss2.php redundancy
| Reported by: | clodromanean | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Feeds | Version: | 4.0.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | template |
Description (last modified by )
In feed-rss2.php there is the following code segment starting on line 90:
<?php if (get_option('rss_use_excerpt')) : ?>
<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
<?php else : ?>
<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>
The if and else actions are the same. The statement after the else should be something else, or if unnecessary, should be removed.
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks for your report and for contributing to WordPress core!
There's actually another
if/else-block coming after the theelsethat you mention (six lines of code, down to the line<?php endif; ?>). Thus, theifandelseactions are in fact different here.Now, there is a redundancy with the
<description><![CDATA[<?php the_excerpt_rss(); ?>]]></description>line, which technically could be moved out of thisif/elsecheck. I don't really think that this brings advantages here though. It might just make the code harder to comprehend.Of course, if you want, create a patch for this and I'm sure a core committer will take a second look! :-)