Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#46853 closed defect (bug) (fixed)

Incorrect type docblock annotation for $value in wp-includes/customize/class-wp-customize-nav-menu-item-setting.php

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

Description

$value is defined as an array type according to the docblock but occasionally might be assigned a null value. The attached patch fixes the docblock to also state that null is allowed.

Attachments (1)

46853.diff (1.2 KB) - added by diddledani 6 years ago.
patch to change type annotation in docblock from array to array|null

Download all attachments as: .zip

Change History (4)

@diddledani
6 years ago

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

#1 @SergeyBiryukov
6 years ago

  • Component changed from General to Customize
  • Focuses docs added

Related: #46852, #46854.

Last edited 6 years ago by SergeyBiryukov (previous) (diff)

#2 @SergeyBiryukov
6 years ago

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

In 45427:

Docs: Correct @type annotation for WP_Customize_Nav_Menu_Item_Setting::$value.

Props diddledan.
Fixes #46853.

#3 @desrosj
6 years ago

  • Milestone changed from Awaiting Review to 5.3
Note: See TracTickets for help on using tickets.