Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#46860 closed defect (bug) (fixed)

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

Reported by: diddledani's profile diddledani Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.3 Priority: normal
Severity: normal Version:
Component: HTTP API Keywords: has-patch
Focuses: docs Cc:

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 diddledani 5 years ago.
patch to change type annotation in docblock to also include false

Download all attachments as: .zip

Change History (3)

@diddledani
5 years ago

patch to change type annotation in docblock to also include false

#1 @SergeyBiryukov
5 years ago

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

#2 @SergeyBiryukov
5 years 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.