Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#29392 closed defect (bug) (fixed)

Notice on install screen.

Reported by: markoheijnen's profile markoheijnen Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: minor Version: 4.0
Component: HTTP API Keywords: has-patch commit dev-reviewed
Focuses: Cc:

Description

It's an edge case so unsure if we need to patch it. There are a same check in block_request() but that one really seems trivial.

Attachments (3)

29392.diff (527 bytes) - added by markoheijnen 11 years ago.
29392.2.diff (1.3 KB) - added by SergeyBiryukov 11 years ago.
29392.3.diff (1.4 KB) - added by SergeyBiryukov 11 years ago.

Download all attachments as: .zip

Change History (11)

@markoheijnen
11 years ago

This ticket was mentioned in IRC in #wordpress-dev by markoheijnen. View the logs.


11 years ago

#2 @stephdau
11 years ago

Edge case or not, I'd add the test you have in your patch. You could also replace isset() by empty(), and the test would also stop there whether not set or empty. Regardless, I think we're better off with one more edge case test than missing it when needed (since the perf cost is trivial). :)

Last edited 11 years ago by stephdau (previous) (diff)

#3 @SergeyBiryukov
11 years ago

  • Component changed from General to HTTP API

See also #28648 and [28865].

29392.2.diff makes all three checks consistent.

This ticket was mentioned in IRC in #wordpress-dev by helen. View the logs.


11 years ago

#5 @nacin
11 years ago

  • Keywords commit dev-reviewed added

If we're going to do if ( 'localhost' == $check['host'] || isset( $home['host'] ) && $home['host'] == $check['host'] ) I'd like parentheses around isset( $home['host'] ) && $home['host'] == $check['host'] so it's absolutely clear as to the order of operations.

Otherwise, this is good.

This ticket was mentioned in IRC in #wordpress-dev by nacin. View the logs.


11 years ago

#8 @SergeyBiryukov
11 years ago

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

In 29661:

Avoid PHP notices when checking for local requests in in WP_Http.

props markoheijnen.
fixes #29392.

Note: See TracTickets for help on using tickets.