#25068 closed defect (bug) (duplicate)
Require relative to working directory, not file
Reported by: | hakre | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.6 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
Some requires are done relative to the current working directory of the script albeit those are meant to be relative to the file itself.
This should also prevent to trigger a PHP include path search.
Attachments (3)
Change History (9)
#2
@
11 years ago
Fine. The first point of your comment - double / triple / quadrupel dirname preference - is addressed with the latest attachment.
For the second point I need more pointers by you, e.g. 2-3 examples so I do see the issue. It's perhaps not worth the work for this issue and could be put into another one if you think this is worth to change.
#3
@
11 years ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Duplicate of #17092.
#4
follow-up:
↓ 5
@
11 years ago
hakre, can you add your patches to #17092 please?
We should also take another look at the statement from sivel, ticket:17092:3.
#5
in reply to:
↑ 4
@
11 years ago
Replying to ocean90:
hakre, can you add your patches to #17092 please?
Yes.
We should also take another look at the statement from sivel, ticket:17092:3.
You mean the micro-optimization bs?
#6
in reply to:
↑ 1
@
11 years ago
Replying to nacin:
Looking good. A few points:
dirname( dirname( __FILE__ ) ) . '/foo'
is preferred todirname( __FILE__ ) . '/../'
.- Once the bootstrap is available, we should use
ABSPATH . 'wp-admin/admin-footer.php;'
(et al),ABSPATH . WPINC
, etc.
The patch is now on ticket #17092 http://core.trac.wordpress.org/attachment/ticket/17092/17092.001.patch
ABSPATH is now used as applicable.
I'm through with it, please give it some traction it's a hell of a work.
Looking good. A few points:
dirname( dirname( __FILE__ ) ) . '/foo'
is preferred todirname( __FILE__ ) . '/../'
.ABSPATH . 'wp-admin/admin-footer.php;'
(et al),ABSPATH . WPINC
, etc.