WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 7 weeks ago

Last modified 7 weeks ago

#25860 closed defect (bug) (fixed)

Copy version.php last during updates

Reported by: dd32 Owned by: dd32
Milestone: 3.9 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch needs-testing
Focuses: Cc:

Description

Sometimes when updating, the process fails mid-way due to circumstances out of our control.

In some cases, version.php may be copied before the error occurs, when this happens WordPress believes that it's $new_version rather than the previous version.

We should instead, only copy version.php over last, so as to ensure that we don't end up in that situation.

Attachments (1)

25860.diff (1.5 KB) - added by dd32 7 weeks ago.

Download all attachments as: .zip

Change History (7)

comment:1 nacin8 weeks ago

  • Milestone changed from Awaiting Review to 3.9

I agree with this, let's do it.

dd327 weeks ago

comment:2 dd327 weeks ago

  • Keywords has-patch needs-testing added; needs-patch removed

Attached an untested patch of what I had locally

comment:3 dd327 weeks ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 27336:

Upgrader: Copy wp-includes/version.php over last, to avoid an installation failing with the new version.php in place. Fixes #25860

comment:4 dd327 weeks ago

In 27337:

Upgrader: Remove two stray spaces. See #25860

comment:5 dd327 weeks ago

In 27338:

Upgrader: Remove some debug from r27336. See #25860

comment:6 dd327 weeks ago

In 27339:

Upgrader: Remove more debug from r27336. See #25860

Note: See TracTickets for help on using tickets.