#57074 closed defect (bug) (fixed)
Remove extra slashes when concatenating ABSPATH with a path
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 6.2 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | General | Keywords: | has-patch has-unit-tests |
| Focuses: | coding-standards | Cc: |
Description
Follow-up to @emanuelx's findings in #57071:
ABSPATH is defined and documented to end with a forward slash /.
In some Core files, a string that begins with a / is appended, leading to // in the resulting path.
While this usually doesn't lead to issues, it at least brings confusion.
Searching for ABSPATH . '/ and ABSPATH . "/ revealed 13 files where this happens.
The attached patch removes the extra /.
Attachments (1)
Change History (5)
This ticket was mentioned in PR #3673 on WordPress/wordpress-develop by @audrasjb.
3 years ago
#1
- Keywords has-unit-tests added
#2
@
3 years ago
Hello there, thanks for the ticket and the patch!
I put together a PR with your patch, just to make sure unit tests are passing.
#3
@
3 years ago
- Owner set to audrasjb
- Resolution set to fixed
- Status changed from new to closed
In 54872:
@audrasjb commented on PR #3673:
3 years ago
#4
Committed in https://core.trac.wordpress.org/changeset/54872
Note: See
TracTickets for help on using
tickets.
https://core.trac.wordpress.org/ticket/57074