Make WordPress Core

Opened 10 years ago

Closed 10 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's profile jdgrimes Owned by: azaozz's profile azaozz
Milestone: 4.1 Priority: normal
Severity: normal Version: 2.8
Component: Upgrade/Install Keywords: needs-docs
Focuses: Cc:


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 10 years ago.

Download all attachments as: .zip

Change History (6)

10 years ago

#1 @jdgrimes
10 years ago

  • Keywords has-patch added

#2 @dd32
10 years ago

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

#3 @azaozz
10 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
10 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
10 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.