WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#16958 closed defect (bug) (fixed)

Dead Code in WP_Http::processResponse()

Reported by: 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 3 years ago.
first member of array will always be set by the explode command.

Download all attachments as: .zip

Change History (5)

hakre3 years ago

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

comment:1 follow-up: dd323 years ago

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

comment:2 in reply to: ↑ 1 hakre3 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. 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.

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.

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

Related: #16978, #16942

Version 0, edited 3 years ago by hakre (next)

comment:3 dd323 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

comment:4 dd323 years ago

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