#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)
Change History (4)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Nevermind, this is necessary after more thorough testing.