Opened 5 years ago
Closed 5 years ago
#49941 closed enhancement (wontfix)
Replace path building for include with direct filename
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | |
Focuses: | coding-standards | Cc: |
Description
https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/upgrade.php#L17
require_once 'admin.php';
Change History (1)
Note: See
TracTickets for help on using
tickets.
Hi there, welcome to WordPress Trac! Thanks for the ticket.
Using
ABSPATH
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_path
configuration, which in some scenarios can lead to including a wrong file and causing obscure issues.Using a full path guards against that.