Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#44071 closed defect (bug) (duplicate)

Unreachable condition in elseIF

Reported by: akshayar's profile akshayar Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.9.5
Component: General Keywords: needs-patch
Focuses: Cc:

Description (last modified by swissspidy)

There is duplicate 'is_post_type_archive' conditional check-in 'elseif' condition. You can check 'feed_links_extra()' function located at 'general-template.php' file under 'wp-includes' directory conatains,

This block will never get executed.

Attachments (2)

feed-link.patch (1.1 KB) - added by akshayar 6 years ago.
feed-link-modified.patch (1.1 KB) - added by akshayar 6 years ago.

Download all attachments as: .zip

Change History (5)

6 years ago

#1 @swissspidy
6 years ago

  • Description modified (diff)
  • Keywords needs-patch added; has-patch removed

#2 @akshayar
6 years ago

Both blocks of code have a difference in fetching '$post_type_obj' and in generating the title. We can add an extra check to validate 'post_type_obj' and the attached ('feed-link-modified.patch') patch can be used.
As feed link for the archive is working, not changed reference in the earlier block.

#3 @desrosj
6 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Thanks for the ticket and patches, @akshayar. #43860 has more discussion, so closing this ticket out as a duplicate.

Note: See TracTickets for help on using tickets.