Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#45918 closed defect (bug) (invalid)

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

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


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

Download all attachments as: .zip

Change History (3)

4 years ago

#1 @swissspidy
4 years 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
4 years ago

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

Note: See TracTickets for help on using tickets.