Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#16958 closed defect (bug) (fixed)

Dead Code in WP_Http::processResponse()

Reported by: hakre's profile hakre Owned by:
Milestone: 3.2 Priority: lowest
Severity: trivial Version: 3.1
Component: HTTP API Keywords: has-patch
Focuses: Cc:

Description

See patch.

Attachments (1)

16958.patch (566 bytes) - added by hakre 13 years ago.
first member of array will always be set by the explode command.

Download all attachments as: .zip

Change History (5)

@hakre
13 years ago

first member of array will always be set by the explode command.

#1 follow-up: @dd32
13 years ago

  • Component changed from General to HTTP
  • Priority changed from normal to lowest
  • Severity changed from minor to trivial

#2 in reply to: ↑ 1 @hakre
13 years ago

Replying to dd32:

Is this an actual bug? http://wpdevel.wordpress.com/2011/03/23/code-refactoring/

I rate dead code as a bug if the code in question does not give any enhance but instead only consumes. Bugs have not much in common with the issue about applying coding standards you referenced.

I think once reported it is often easy to fix and make the code lighter. But it's not that I report them out of the blue.

I normally spot those while reviewing code in other tickets, so I think those are worth to report. Maybe we can have a family ticket for those. It's just like how I find those: 16978.patch which for example already has been committed. It's just not that always there is a ticket already to add the patch to.

So maybe we should turn this into a collecting ticket a core dev can review each some days.

Related: #16978, #16942

Last edited 13 years ago by hakre (previous) (diff)

#3 @dd32
13 years ago

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

(In [17600]) explode always returns an array in this context. Props hakre. Fixes #16958

#4 @dd32
13 years ago

  • Milestone changed from Awaiting Review to 3.2
Note: See TracTickets for help on using tickets.