Make WordPress Core

Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#63790 closed defect (bug) (reported-upstream)

Incorrect return tag in DocBlock for block_core_image_get_lightbox_settings()

Reported by: marian1's profile marian1 Owned by:
Milestone: Priority: normal
Severity: trivial Version:
Component: Editor Keywords: has-patch close
Focuses: docs Cc:

Description

The documented return type is array (@return array Filtered block data.), but block_core_image_get_lightbox_settings() may also return null.

The @return annotation should be updated to @return array|null to reflect the actual return types.

Change History (6)

#1 @abcd95
6 months ago

Thanks, @marian1, for noticing the issue.

I think this might do the job -

@return array|null Filtered block data.

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


6 months ago
#2

  • Keywords has-patch added

#3 @westonruter
6 months ago

  • Component changed from Media to Editor
  • Keywords close added

Since this is on a block, I believe the change should be made directly to Gutenberg here: https://github.com/WordPress/gutenberg/blob/c27ad4007db70a4dcca7218f02407ee816cbdc1b/packages/block-library/src/image/index.php#L103

Then it will automatically get synced over to core.

#4 @abcd95
6 months ago

Thanks @westonruter, I figured this out when the tests started failing and they mentioned these files could not be modified from here.

I have created a PR there.

#5 @westonruter
6 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.