Make WordPress Core

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#5695 closed defect (bug) (invalid)

setup-config.php unnecessarily writes to wp-config.php on every line

Reported by: hansengel's profile hansengel Owned by: hansengel's profile hansengel
Milestone: Priority: normal
Severity: normal Version: 2.5
Component: Optimization Keywords:
Focuses: Cc:

Description

In wp-admin/setup-config.php, a loop is run to read each line of wp-config-sample.php. There is a default case that says if it can't find a match, that it will overwrite the file anyway with its contents.

This is completely unnecessary, because the file writes wp-config.php for every line, even if there's no match. This just slows down the process!

Also, for some reason str_replace functions used in the switch statement are used differently for separate cases, when there is no need.

Attachments (1)

5695.r6637.diff (942 bytes) - added by hansengel 18 years ago.

Download all attachments as: .zip

Change History (4)

#1 @hansengel
18 years ago

  • Status changed from new to assigned

#2 follow-up: @hansengel
18 years ago

  • Resolution set to invalid
  • Status changed from assigned to closed

Nevermind, this is necessary after more thorough testing.

#3 in reply to: ↑ 2 @westi
18 years ago

  • Keywords has-patch removed
  • Milestone 2.5 deleted

Replying to hansengel:

Nevermind, this is necessary after more thorough testing.

Indeed - otherwise wp-config.php would be a little empty.

Note: See TracTickets for help on using tickets.