Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#49005 closed defect (bug) (fixed)

Documentation: WP_HTTP timeout is a float, not an int.

Reported by: georgestephanis's profile georgestephanis Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.4 Priority: low
Severity: minor Version:
Component: HTTP API Keywords: has-patch commit
Focuses: docs Cc:

Description

As demonstrated in Core since [10474] timeout hasn't been an int.

The Requests library also documents it as a float, with millisecond precision:

https://core.trac.wordpress.org/browser/trunk/src/wp-includes/class-requests.php?rev=46661#L309

Patch attached.

Attachments (1)

49005.patch (998 bytes) - added by georgestephanis 5 years ago.

Download all attachments as: .zip

Change History (6)

#1 @georgestephanis
5 years ago

Thanks to @benedictsinger for spotting this at a meetup and asking why we were passing a float to an int parameter. :)

#2 @georgestephanis
5 years ago

Docs tracks back to [29230]

#3 @dd32
5 years ago

  • Keywords commit added

#4 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 5.4

#5 @SergeyBiryukov
5 years ago

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

In 46970:

Docs: Correct @type for timeout argument in WP_Http::request().

Props georgestephanis, benedictsinger.
Fixes #49005.

Note: See TracTickets for help on using tickets.