Opened 6 years ago
Closed 6 years ago
#49940 closed enhancement (wontfix)
Replace dirname( __DIR__ ) with relative path
| Reported by: | flip101 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | coding-standards |
Description
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/user/admin.php#L12
require_once '../admin.php';
Maybe also in other parts of code
Change History (1)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi there, welcome to WordPress Trac! Thanks for the ticket.
Using
dirname( __DIR__ )is intentional here, see [25616] / #17092 and comment:1:ticket:37060 for more context.Switching to a relative path would make the code rely on PHP
include_pathconfiguration, which in some scenarios can lead to including a wrong file and causing obscure issues.Using a full path guards against that.