WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#29088 closed defect (bug) (fixed)

Plugin_Upgrader::deactivate_plugin_before_upgrade() is hooked to a filter, but doesn't always return a value

Reported by: jdgrimes Owned by: azaozz
Milestone: 4.1 Priority: normal
Severity: normal Version: 2.8
Component: Upgrade/Install Keywords: needs-docs
Focuses: Cc:

Description

Plugin_Upgrader::deactivate_plugin_before_upgrade() is hooked to the 'upgrader_pre_install' filter by Plugin_Upgrader::upgrade(), but it doesn't always return a value. This still works because the result of the filter is only checked with is_wp_error() (in WP_Upgrader::install_package()). However, it could certainly cause bugs for other functions hooked to that filter.

Attachments (1)

29088.diff (457 bytes) - added by jdgrimes 6 years ago.

Download all attachments as: .zip

Change History (6)

@jdgrimes
6 years ago

#1 @jdgrimes
6 years ago

  • Keywords has-patch added

#2 @dd32
6 years ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 4.1

#3 @azaozz
6 years ago

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

In 30761:

Always return a value in Plugin_Upgrader::deactivate_plugin_before_upgrade(). Props jdgrimes. Fixes #29088.

#4 @DrewAPicture
6 years ago

  • Keywords needs-docs added; has-patch commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Can we please get an @return description added to the DocBlock as well as a changelog entry that a return was added in 4.1.0?

#5 @azaozz
6 years ago

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

In 30762:

Better docs for Plugin_Upgrader::deactivate_plugin_before_upgrade(). Props DrewAPicture. Fixes #29088.

Note: See TracTickets for help on using tickets.