[wp-trac] [WordPress Trac] #44249: Assignments must be the first block of code on a line
WordPress Trac
noreply at wordpress.org
Mon May 28 12:37:13 UTC 2018
#44249: Assignments must be the first block of code on a line
------------------------------+-----------------------------
Reporter: subrataemfluence | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
File: wp-admin/includes/plugin.php
Function: get_plugins
Line number: 247
Original function body:
{{{#!php
<?php
function get_plugins( $plugin_folder = '' ) {
if ( ! $cache_plugins = wp_cache_get( 'plugins', 'plugins' ) ) {
$cache_plugins = array();
}
}
}}}
Revised function body:
{{{#!php
<?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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44249>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list