Opened 7 years ago
Closed 6 years ago
#42452 closed defect (bug) (fixed)
filter_rest_url_for_leading_slash assertion is broken
Reported by: | rmccue | Owned by: | rmccue |
---|---|---|---|
Milestone: | 5.0 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | REST API | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
This is originally from https://github.com/WP-API/WP-API/issues/2424
The test checks if rest_url()
was called with a leading slash and fails if it wasn't. This is broken because WordPress core itself calls rest_url()
with no leading slashes in a few places (notably, WP_REST_Posts_Controller::prepare_links
).
This is never surfaced in core, because the test only fails if permalink_structure
is set, which it isn't in the tests. Third-party tests which use this base class and which set a permalink structure will fail (unless they're on multisite, in which case the test is bypassed anyway).
Attachments (1)
Change History (6)
Note: See
TracTickets for help on using
tickets.
In 42250: