Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#5695 closed defect (bug) (invalid)

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

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

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 19 years ago.

Download all attachments as: .zip

Change History (4)

#1 @hansengel
19 years ago

  • Status newassigned

#2 follow-up: @hansengel
19 years ago

  • Resolutioninvalid
  • Status assignedclosed

Nevermind, this is necessary after more thorough testing.

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

  • Keywords has-patch removed
  • Milestone 2.5

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.