WordPress.org

Make WordPress Core

Opened 5 months ago

Last modified 7 weeks ago

#47796 new defect (bug)

uninstall_plugin should do an include_once not include

Reported by: pcfreak30 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Plugins Keywords: has-patch
Focuses: Cc:
PR Number:

Description

This seems to be an edge case, but it is possible for a plugin file to already be loaded when uninstall_plugin is run (like if done programmatically).

This can cause a fatal, and the simple solution is to use include_once.

Attachments (1)

47796.diff (843 bytes) - added by valchovski 7 weeks ago.

Download all attachments as: .zip

Change History (3)

#1 @ianbelanger
5 months ago

  • Summary changed from uninstall_plugin should do an include_one not include to uninstall_plugin should do an include_once not include
  • Version trunk deleted

@valchovski
7 weeks ago

#2 @valchovski
7 weeks ago

  • Keywords has-patch added; needs-patch removed

Hey!

Updated both include calls to include_once instead in the uninstall_plugin function

Note: See TracTickets for help on using tickets.