Opened 6 years ago
Closed 5 years ago
#44395 closed enhancement (duplicate)
PHPCS: Assignment must be the first block of code on a line
Reported by: | subrataemfluence | Owned by: | |
---|---|---|---|
Milestone: | 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)
Change History (2)
Note: See
TracTickets for help on using
tickets.
Duplicate of #47632.