Opened 8 weeks ago
Last modified 8 weeks ago
#51839 new defect (bug)
When get_feed_permastruct() return false, get_feed_link() return incorrect non feed url
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 5.7 | Priority: | normal |
Severity: | minor | Version: | 5.5 |
Component: | Feeds | Keywords: | has-patch needs-unit-tests |
Focuses: | Cc: |
Description
When $this->permalink_structure is empty & $this->feed_structure is not set, the function get_feed_permastruct() would return boolean false
causing get_feed_link() return incorrect non-feed url.
Patch file to fix is attached.
Attachments (2)
Change History (4)
#2
@
8 weeks ago
In 51839.diff I've moved the change to get_feed_link()
rather than changing the return value and type of $wp_rewrite->get_feed_permastruct()
.
This is to avoid backward compatibility breaking for theme or plugin developers using the condition if ( $wp_rewrite->get_feed_permastruct() === false ) {}
.
Note: See
TracTickets for help on using
tickets.
Thanks for the report, I've verified the issue. It was introduced in [47808] during the 5.5 release.
I'll move this to the 5.7 milestone. It would be good to include some tests for
get_feed_link()
when the permalink structure is undefined so I've added theneeds-unit-tests
keyword too.