WordPress.org

Make WordPress Core

#49005 closed defect (bug) (fixed)

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

Reported by: georgestephanis Owned by: 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 17 months ago.

Download all attachments as: .zip

Change History (6)

#1 @georgestephanis
17 months ago

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

#2 @georgestephanis
17 months ago

Docs tracks back to [29230]

#3 @dd32
17 months ago

  • Keywords commit added

#4 @SergeyBiryukov
17 months ago

  • Milestone changed from Awaiting Review to 5.4

#5 @SergeyBiryukov
17 months 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.