WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 months ago

#53546 closed defect (bug) (fixed)

Incorrect documentation for the 'upgrader_pre_install' filter

Reported by: SergeyBiryukov Owned by: SergeyBiryukov
Milestone: 5.9 Priority: normal
Severity: normal Version: 3.9
Component: Upgrade/Install Keywords: good-first-bug has-patch commit
Focuses: docs Cc:

Description (last modified by SergeyBiryukov)

The upgrader_pre_install filter description says:

Returning a truthy value, or one that could be evaluated as a WP_Error will effectively short-circuit the installation, returning that value instead.

As far as I can tell, only the second part is true. Returning a WP_Error object does indeed short-circuit the installation. Returning a truthy value, on the other hand, does nothing.

The description should be adjusted to remove the incorrect statement.

Introduced in [27673].

Attachments (1)

53546.diff (686 bytes) - added by ilovecats7 4 months ago.

Download all attachments as: .zip

Change History (5)

#1 @SergeyBiryukov
4 months ago

  • Description modified (diff)
  • Version set to 3.9

@ilovecats7
4 months ago

#2 @ilovecats7
4 months ago

  • Keywords has-patch dev-feedback added; needs-patch removed

#3 @SergeyBiryukov
4 months ago

  • Keywords commit added; dev-feedback removed

Hi there, thanks for the patch! It looks great :)

#4 @SergeyBiryukov
4 months ago

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

In 51329:

Docs: Correct description for the upgrader_pre_install filter.

Props ilovecats7.
Fixes #53546.

Note: See TracTickets for help on using tickets.