#63790 closed defect (bug) (reported-upstream)
Incorrect return tag in DocBlock for block_core_image_get_lightbox_settings()
| Reported by: |
|
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)
This ticket was mentioned in PR #9393 on WordPress/wordpress-develop by @abcd95.
6 months ago
#2
- Keywords has-patch added
#3
@
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
@
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
@
6 months ago
- Milestone Awaiting Review deleted
- Resolution set to reported-upstream
- Status changed from new to closed
6 months ago
#6
Closing this as completed via https://github.com/WordPress/gutenberg/pull/71073
Thanks, @marian1, for noticing the issue.
I think this might do the job -
@return array|null Filtered block data.