Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#55450 closed defect (bug) (fixed)

WP_Upgrader::run docblock incorrect

Reported by: paulkevan's profile paulkevan Owned by: davidbaumwald's profile davidbaumwald
Milestone: 6.0 Priority: normal
Severity: normal Version: 2.8
Component: Upgrade/Install Keywords: has-patch
Focuses: docs Cc:

Description

The docblock description for the run function inaccurately has the default value for clear_working as false, whereas the default is true.

The ordering of the array values should also be updated to be consistent with the docblock, similar to the install_package function.

Change History (7)

This ticket was mentioned in PR #2452 on WordPress/wordpress-develop by pkevan.


2 years ago
#1

  • Keywords has-patch added

Fixes the difference between docblock and the code, and also reorders for consistency.

Trac ticket: https://core.trac.wordpress.org/ticket/55450

#2 @davidbaumwald
2 years ago

  • Milestone changed from Awaiting Review to 6.0
  • Owner set to davidbaumwald
  • Status changed from new to reviewing

#3 @davidbaumwald
2 years ago

  • Focuses docs added

#4 @davidbaumwald
2 years ago

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

In 52986:

Upgrade/Install: Fix the docs for the default value of $clear_working in WP_Upgrader::run.

The current docblock for WP_Upgrader::run indicates the default value for the clear_working key of the $options argument is false. However, in the code directly below, the default is shown to be `true. This change updates the docblock to correct the default.

This commit also reorders the $defaults to match the order they appear in the docblock.

Props paulkevan.
Fixes #55450.

dream-encode commented on PR #2452:


2 years ago
#5

Thanks for the PR! This was merged in https://core.trac.wordpress.org/changeset/52986.

#6 @costdev
2 years ago

  • Version changed from trunk to 2.8

Introduced in [11005].

#7 @SergeyBiryukov
2 years ago

And the docs were added in [30758].

Note: See TracTickets for help on using tickets.