#63790 closed defect (bug) (reported-upstream)
Incorrect return tag in DocBlock for block_core_image_get_lightbox_settings()
| Reported by: | marian1 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Editor | Version: | |
| Severity: | trivial | Keywords: | has-patch close |
| Cc: | Focuses: | docs |
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.
12 months ago
#2
- Keywords has-patch added
#3
@
12 months ago
- Component Media → 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
@
12 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.
12 months ago
#6
Closing this as completed via https://github.com/WordPress/gutenberg/pull/71073
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thanks, @marian1, for noticing the issue.
I think this might do the job -
@return array|null Filtered block data.