[wp-trac] [WordPress Trac] #50833: [PHP 8] GD resources are GdImage object instances
WordPress Trac
noreply at wordpress.org
Sun Aug 16 16:02:07 UTC 2020
#50833: [PHP 8] GD resources are GdImage object instances
-------------------------------------------+-------------------------------
Reporter: ayeshrajans | Owner: SergeyBiryukov
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.6
Component: Media | Version:
Severity: normal | Resolution: fixed
Keywords: php8 has-patch needs-dev-note | Focuses: coding-standards
-------------------------------------------+-------------------------------
Changes (by SergeyBiryukov):
* keywords: php8 has-patch => php8 has-patch needs-dev-note
Comment:
Replying to [comment:9 jrf]:
> Thinking it over now, I don't think it is necessary unless/until the
page/post editing on the front-end would be implemented.
>
> Just plain showing or moving images generally won't need this
`is_gd_image()` function, as the GD extension isn't needed for that. It is
only image ''creation'' and/or ''editing'' which needs GD and therefore
will need this function.
Thanks! I came to same conclusion and chose not to reopen the ticket at
this time.
The only relevant instance in core seems to be
`WP_REST_Attachments_Controller::edit_media_item()`, but it already
requires `wp-admin/includes/image.php`, where `is_gd_image()` is defined.
It's hard to tell if any plugins that implement front-end editing might
need the function too, I guess we can wait and see if there are any
reports during the dev cycle.
> On another note - should we add the `needs-dev-note` tag to this ticket
? This new function should get a mention in the PHP 8 dev-note for WP 5.6.
Yes, we should :) Thanks!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50833#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list