[wp-trac] [WordPress Trac] #49940: Replace dirname( __DIR__ ) with relative path
WordPress Trac
noreply at wordpress.org
Sat Apr 18 06:38:33 UTC 2020
#49940: Replace dirname( __DIR__ ) with relative path
----------------------------+-------------------------------
Reporter: flip101 | Owner: (none)
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Administration | Version:
Severity: normal | Resolution: wontfix
Keywords: | Focuses: coding-standards
----------------------------+-------------------------------
Changes (by SergeyBiryukov):
* status: new => closed
* resolution: => wontfix
* focuses: => coding-standards
* component: General => Administration
* milestone: Awaiting Review =>
Comment:
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_path` configuration, which in some scenarios can lead to
including a wrong file and causing obscure issues.
Using a full path guards against that.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49940#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list