Opened 6 weeks ago
Closed 5 weeks ago
#63102 closed defect (bug) (fixed)
Remove extra slashes when concatenating ABSPATH with a path, take 2
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.8 | Priority: | low |
Severity: | minor | Version: | |
Component: | General | Keywords: | good-first-bug has-patch |
Focuses: | coding-standards | Cc: |
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.
5 weeks ago
#1
- Keywords has-patch added; needs-patch removed
Note: See
TracTickets for help on using
tickets.
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