Make WordPress Core

Opened 3 months ago

Closed 3 months ago

#64583 closed defect (bug) (fixed)

Incorrect PHPDoc type for WP_Theme::$cache_expiration

Reported by: marian1's profile marian1 Owned by: westonruter's profile westonruter
Milestone: 7.0 Priority: normal
Severity: minor Version: 3.4
Component: Themes Keywords: has-patch commit
Focuses: docs Cc:

Description

WP_Theme::$cache_expiration is documented as bool, but the property is initialised with an int default value and is consistently treated as an int (cache TTL in seconds) throughout WP_Theme. This is a documentation/type mismatch which can mislead developers and tooling.

Change History (4)

This ticket was mentioned in PR #10838 on WordPress/wordpress-develop by @marian1.


3 months ago
#1

  • Keywords has-patch added

#2 @mukesh27
3 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 7.0
  • Version set to 3.4

Thanks for the ticket and PR!

This was introduce in #20103/[20029]

#3 @westonruter
3 months ago

  • Owner set to westonruter
  • Status changed from new to reviewing

#4 @westonruter
3 months ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 61574:

Docs: Correct type of WP_Theme::$cache_expiration from bool to int.

Follow-up to [20029].

Props marian1, mukesh27.
See #20103, #64224.
Fixes #64583.

Note: See TracTickets for help on using tickets.