Make WordPress Core

Opened 12 years ago

Closed 12 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
Priority: normal Milestone: 4.1
Component: Upgrade/Install Version: 2.8
Severity: normal Keywords: needs-docs
Cc: Focuses:

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

Download all attachments as: .zip

Change History (6)

@jdgrimes
12 years ago

#1 @jdgrimes
12 years ago

  • Keywords has-patch added

#2 @dd32
12 years ago

  • Keywords commit added
  • Milestone Awaiting Review4.1

#3 @azaozz
12 years ago

  • Owner set to azaozz
  • Resolutionfixed
  • Status newclosed

In 30761:

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

#4 @DrewAPicture
12 years ago

  • Keywords needs-docs added; has-patch commit removed
  • Resolution fixed
  • Status closedreopened

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
12 years ago

  • Resolutionfixed
  • Status reopenedclosed

In 30762:

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

Note: See TracTickets for help on using tickets.