Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#20760 closed defect (bug) (duplicate)

Erroneous use of str_replace() in setup-config.php

Reported by: johnbillion Owned by:
Milestone: Priority: low
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch
Focuses: Cc:


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)

20760.patch (598 bytes) - added by johnbillion 9 years ago.
20760.2.patch (670 bytes) - added by SergeyBiryukov 9 years ago.

Download all attachments as: .zip

Change History (5)

9 years ago

#1 @johnbillion
9 years ago

  • Keywords has-patch added


#2 @SergeyBiryukov
9 years 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.

#3 @SergeyBiryukov
9 years 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.