Opened 13 months ago
Closed 13 months ago
#20760 closed defect (bug) (duplicate)
Erroneous use of str_replace() in setup-config.php
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | Upgrade/Install | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
In wp-admin/setup-config.php we have an instance of str_replace() which uses a blank string in the $subject parameter. While it has no detrimental effect, it may as well be removed to avoid some head scratching.
function get_bloginfo() {
return ( ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . str_replace( $_SERVER['PHP_SELF'], '/wp-admin/setup-config.php', '' ) );
}
Attachments (2)
Change History (5)
johnbillion
— 13 months ago
comment:1
johnbillion
— 13 months ago
- Keywords has-patch added
SergeyBiryukov
— 13 months ago
comment:2
SergeyBiryukov
— 13 months ago
Introduced in [13026].
I guess the idea was to return a correct URL for site in a subdirectory. Perhaps we should fix the order of arguments rather than remove the replacement.
comment:3
SergeyBiryukov
— 13 months ago
- Component changed from General to Upgrade/Install
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
Patch