WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#10736 closed defect (bug) (fixed)

Unneeded initialization of $output

Reported by: nbachiyski Owned by:
Milestone: 2.9 Priority: lowest
Severity: trivial Version: 2.9
Component: General Keywords: has-patch tested
Focuses: Cc:

Description

The variable is initialized and on the next line it is set to another value. In this case there is no need of the initialization.

Attachments (1)

unneeded-initialization.diff (456 bytes) - added by nbachiyski 6 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 @nbachiyski6 years ago

  • Keywords has-patch added

comment:2 @scribu6 years ago

  • Milestone changed from Unassigned to 2.9

comment:3 @miqrogroove5 years ago

  • Cc miqrogroove@… added
  • Keywords tested added

I'll second that. $output === NULL if the assignment is ever invalid, so the extra string assignment was meaningless in this scope.

Line numbers are slightly different in Revision 12149.

comment:4 @ryan5 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12194]) Remove unnecessary variable initialization. Props nbachiyski. fixes #10736

Note: See TracTickets for help on using tickets.