WordPress.org

Make WordPress Core

Opened 8 months ago

Closed 3 months ago

#25887 closed defect (bug) (fixed)

$comparison is unused in maintenance_nag()

Reported by: SergeyBiryukov Owned by: dd32
Milestone: 3.7.2 Priority: normal
Severity: normal Version: 3.7
Component: Upgrade/Install Keywords: has-patch commit fixed-major
Focuses: Cc:

Description

Noticed while working on #14028.

There's a line in maintenance_nag() that is supposed to change the comparison type in version_compare() in the next line (see the comment above): tags/3.7.1/src/wp-admin/includes/update.php#L356.

However, $comparison is unused, so it doesn't actually change anything.

Attachments (1)

25887.patch (560 bytes) - added by SergeyBiryukov 8 months ago.

Download all attachments as: .zip

Change History (7)

SergeyBiryukov8 months ago

comment:1 SergeyBiryukov8 months ago

Introduced in [25872].

comment:2 SergeyBiryukov8 months ago

  • Keywords commit added

comment:3 dd328 months ago

I think this might be the cause of Viper007Bond's issue in #14028 actually.

The nag is only supposed to show for $attempted == $wp_version when a critical failure occurs, currently it shows even when a non-critical error occurs (such as aborting early due to files not writable).

The change appears correct.

comment:4 dd328 months ago

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

In 26186:

Updates: When a failed Background Update occurs, only show the failed update nag if the user hasn't yet updated if it was an early abort. Props SergeyBiryukov. Fixes #25887 for trunk

comment:5 dd328 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:6 nacin3 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 27884:

Updates: When a failed Background Update occurs, only show the failed update nag if the user hasn't yet updated if it was an early abort.

Merges [26186] from 3.8 to the 3.7 branch.

props SergeyBiryukov.
fixes #25887.

Note: See TracTickets for help on using tickets.