WordPress.org

Make WordPress Core

Opened 7 weeks ago

Closed 25 hours ago

#46854 closed defect (bug) (fixed)

Incorrect type docblock annotation for $current_partial_id in wp-includes/customize/class-wp-customize-selective-refresh.php

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

Description

The type annotation docblock indicates that $current_partial_id is a string, but occasionally the variable is assigned a null value. The attached patch fixes the docblock to state that null is allowable as well as string.

Attachments (1)

46854.diff (1.1 KB) - added by diddledan 7 weeks ago.
patch to change type annotation in docblock from string to string|null

Download all attachments as: .zip

Change History (3)

@diddledan
7 weeks ago

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

#1 @SergeyBiryukov
6 weeks ago

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

Related: #46852, #46853.

#2 @SergeyBiryukov
25 hours ago

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

In 45428:

Docs: Correct @type annotation for WP_Customize_Selective_Refresh::$current_partial_id.

Props diddledan.
Fixes #46854.

Note: See TracTickets for help on using tickets.