Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#46859 closed defect (bug) (fixed)

Incorrect type docblock annotation for $expiresin wp-includes/class-wp-http-cookie.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

The variable $expires in the class WP_HTTP_Cookie defined in wp-includes/class-wp-http-cookie.php is defined by the docblock type annotation to be of a string type. However, occasionally the value null may be assigned. The attached patch fixes the docblock to also state that null is allowed.

Attachments (1)

46859.diff (770 bytes) - added by diddledani 6 years ago.
patch to change type annotation in docblock from string to string|null

Download all attachments as: .zip

Change History (3)

@diddledani
6 years ago

patch to change type annotation in docblock from string to string|null

#1 @SergeyBiryukov
6 years ago

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

#2 @SergeyBiryukov
6 years ago

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

In 45748:

Docs: Correct @type annotation for WP_HTTP_Cookie::$expires.

Props diddledan.
Fixes #46859.

Note: See TracTickets for help on using tickets.