#58271 closed defect (bug) (fixed)
Docs: WP_Image_Editor classes have incorrect type for $crop in docblocks
| Reported by: | thunderdw | Owned by: | audrasjb |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.3 |
| Component: | Media | Version: | |
| Severity: | trivial | Keywords: | has-patch |
| Cc: | Focuses: | docs |
Description
The docblocks for the WP_Image_Editor resize() and multi_resize() functions indicate that $crop is of type bool, instead of bool|array. The implementations of these functions by WP_Image_Editor_Imagick and WP_Image_Editor_GD also have these docblock errors, and they additionally both have the error in the docblock for their make_subsize() functions.
The $crop docblock type should match the type documented in image_resize_dimensions().
Affected files:
wp-includes/class-wp-image-editor-gd.phpwp-includes/class-wp-image-editor-imagick.phpwp-includes/class-wp-image-editor.php
Change History (7)
This ticket was mentioned in PR #4434 on WordPress/wordpress-develop by thunderdw.
3 years ago
#2
- Keywords has-patch added
This ticket was mentioned in Slack in #core-media by antpb. View the logs.
3 years ago
This ticket was mentioned in Slack in #core by mukeshpanchal27. View the logs.
3 years ago
#5
@
3 years ago
- Owner changed from to
- Status assigned → reviewing
Self assigning for review/commit.
@audrasjb commented on PR #4434:
3 years ago
#7
committed in https://core.trac.wordpress.org/changeset/56204
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Trac ticket: https://core.trac.wordpress.org/ticket/58271