WordPress.org

Make WordPress Core

Opened 6 weeks ago

Last modified 6 weeks ago

#46859 new defect (bug)

Incorrect type docblock annotation for $expiresin wp-includes/class-wp-http-cookie.php

Reported by: diddledan Owned by:
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 diddledan 6 weeks ago.
patch to change type annotation in docblock from string to string|null

Download all attachments as: .zip

Change History (2)

@diddledan
6 weeks ago

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

#1 @SergeyBiryukov
6 weeks ago

  • Component changed from General to HTTP API
  • Focuses docs added
  • Milestone changed from Awaiting Review to 5.3
Note: See TracTickets for help on using tickets.