Opened 18 months ago
Closed 18 months ago
#63102 closed defect (bug) (fixed)
Remove extra slashes when concatenating ABSPATH with a path, take 2
| Reported by: | SergeyBiryukov | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | low | Milestone: | 6.8 |
| Component: | General | Version: | |
| Severity: | minor | Keywords: | good-first-bug has-patch |
| Cc: | Focuses: | coding-standards |
Description
There are a few of these lines in core:
require_once ABSPATH . '/wp-admin/includes/file.php'; ... require_once ABSPATH . '/wp-admin/includes/plugin.php';
For consistency with the rest of core, the slash before wp-admin can be removed:
require_once ABSPATH . 'wp-admin/includes/file.php'; ... require_once ABSPATH . 'wp-admin/includes/plugin.php';
as ABSPATH already includes a trailing slash.
Change History (2)
This ticket was mentioned in PR #8518 on WordPress/wordpress-develop by @dhruvik18.
18 months ago
#1
- Keywords has-patch added; needs-patch removed
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
This PR removes the leading slash from paths that are concatenated with ABSPATH. Since ABSPATH already includes a trailing slash, adding another slash creates unnecessary double slashes and is inconsistent with most of the WordPress core.
Trac ticket: https://core.trac.wordpress.org/ticket/63102