WordPress.org

Make WordPress Core

Opened 10 months ago

Closed 10 months ago

Last modified 10 months ago

#45918 closed defect (bug) (invalid)

Unused variable in src/wp-includes/update.php

Reported by: imath Owned by:
Milestone: Priority: normal
Severity: minor Version: 5.1
Component: Upgrade/Install Keywords: has-patch
Focuses: Cc:
PR Number:

Description

In wp_update_plugins() $active is getting the active plugins but nowhere in the function this variable is used.

I suggest to simply remove the line.

Attachments (1)

45918.patch (505 bytes) - added by imath 10 months ago.

Download all attachments as: .zip

Change History (3)

@imath
10 months ago

#1 @swissspidy
10 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

There's a compact() call later down that uses the variable:

$to_send = compact( 'plugins', 'active' );

Not obvious at first sight and not so ideal, but it is what it is :-)

#2 @imath
10 months ago

Ouch! Thanks a lot for your explanation & for your time. 😇

Note: See TracTickets for help on using tickets.