#57074 closed defect (bug) (fixed)
Remove extra slashes when concatenating ABSPATH with a path
| Reported by: | TobiasBg | Owned by: | audrasjb |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.2 |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: | coding-standards |
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.
4 years ago
#1
- Keywords has-unit-tests added
#2
@
4 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.
@audrasjb commented on PR #3673:
4 years ago
#4
Committed in https://core.trac.wordpress.org/changeset/54872
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
https://core.trac.wordpress.org/ticket/57074