WordPress.org

Make WordPress Core

Opened 4 weeks ago

Last modified 4 weeks ago

#44249 new defect (bug)

Assignments must be the first block of code on a line

Reported by: subrataemfluence Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: trunk
Component: Plugins Keywords: has-patch dev-feedback
Focuses: coding-standards Cc:

Description

File: wp-admin/includes/plugin.php Function: get_plugins Line number: 247

Original function body:

<?php
function get_plugins( $plugin_folder = '' ) {

   if ( ! $cache_plugins = wp_cache_get( 'plugins', 'plugins' ) ) {
        $cache_plugins = array();
   }
}

Revised function body:

<?php
function get_plugins( $plugin_folder = '' ) {
        
   $cache_plugins = wp_cache_get( 'plugins', 'plugins' );
                
   if ( ! $cache_plugins ) {
      $cache_plugins = array();
   }
}

I have uploaded a proposed patch.

Attachments (1)

44249.diff (443 bytes) - added by subrataemfluence 4 weeks ago.

Download all attachments as: .zip

Change History (2)

#1 @subrataemfluence
4 weeks ago

  • Component changed from General to Plugins
  • Focuses coding-standards added
  • Keywords has-patch dev-feedback added
  • Version set to trunk
Note: See TracTickets for help on using tickets.