WordPress.org

Make WordPress Core

Opened 5 weeks ago

#44395 new enhancement

PHPCS: Assignment must be the first block of code on a line

Reported by: subrataemfluence Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch
Focuses: administration, coding-standards Cc:

Description

File: /wp-admin/custom-background.php Line number: 259

Code block as of now:

<?php
if ( $bgcolor = get_background_color() ) {
   $background_styles .= 'background-color: #' . $bgcolor . ';';
}

Modified code:

<?php
$bgcolor = get_background_color();
if ( '' !== $bgcolor ) {
   $background_styles .= 'background-color: #' . $bgcolor . ';';
}

Please let me know if the proposed patch works.

Attachments (1)

44395.diff (491 bytes) - added by subrataemfluence 5 weeks ago.

Download all attachments as: .zip

Change History (1)

Note: See TracTickets for help on using tickets.