WordPress.org

Make WordPress Core

Opened 8 months ago

Closed 7 months ago

#25254 closed defect (bug) (fixed)

WP_Upgrader does not consistently call Skin methods

Reported by: rmccue Owned by: SergeyBiryukov
Milestone: 3.7 Priority: normal
Severity: normal Version:
Component: Upgrade/Install Keywords: has-patch needs-testing commit
Focuses: Cc:

Description

In WP_Upgrader::run() (used by the installer/upgrader routines), the header/footer/before/after methods are not called consistently.

(header/before/error/after/footer are all references to the methods as part of the Skin object, stored in $this->skin)

  • An error in the filesystem will cause a call to error without first calling header/before and without calling after/footer.
  • An error in downloading or unpacking will cause calls to header/before before error, but only after is called after error.
  • An error in actually "installing" (moving into place) or a successful install will cause calls to header/before (then error if errored), then after/footer

In order to actually make these possible to use consistently, the following order should always be followed:

  1. header (if not doing a multiupgrade)
  2. before
  3. error (or other feedback calls; the meat of the processing)
  4. after
  5. footer (if not doing a multiupgrade)

Attachments (2)

25254.diff (1.4 KB) - added by SergeyBiryukov 8 months ago.
25254.2.diff (1.5 KB) - added by SergeyBiryukov 8 months ago.

Download all attachments as: .zip

Change History (8)

SergeyBiryukov8 months ago

comment:1 SergeyBiryukov8 months ago

  • Keywords has-patch needs-testing added

First pass: 25254.diff (untested).

comment:2 dd328 months ago

Looks good to me

comment:3 rmccue8 months ago

Looks good, but footer should only be called for non-multi (since that's the difference between after and footer)

SergeyBiryukov8 months ago

comment:5 dd327 months ago

  • Keywords commit added

comment:6 SergeyBiryukov7 months ago

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

In 25370:

Consistently call skin methods in WP_Upgrader. fixes #25254.

Note: See TracTickets for help on using tickets.