WordPress.org

Make WordPress Core

Opened 7 months ago

Closed 3 months ago

#46860 closed defect (bug) (fixed)

Incorrect type docblock annotation for some variables in wp-includes/class-wp-http-curl.php

Reported by: diddledan Owned by: SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: HTTP API Keywords: has-patch
Focuses: docs Cc:
PR Number:

Description

Some variables in wp-includes/class-wp-http-curl.php include incorrect type definitions in their docblocks:

  • $max_body_length defined as int can sometimes contain false.
  • $stream_handle defined as resource can also sometimes contain false.

Both of these are fixed in the attached patch by adding false as an additional accepted type.

Attachments (1)

46860.diff (1.2 KB) - added by diddledan 7 months ago.
patch to change type annotation in docblock to also include false

Download all attachments as: .zip

Change History (3)

@diddledan
7 months ago

patch to change type annotation in docblock to also include false

#1 @SergeyBiryukov
7 months ago

  • Component changed from General to HTTP API
  • Focuses docs added
  • Milestone changed from Awaiting Review to 5.3

#2 @SergeyBiryukov
3 months ago

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

In 45749:

Docs: Correct @type annotation for WP_Http_Curl properties.

Props diddledan.
Fixes #46860.

Note: See TracTickets for help on using tickets.