[wp-trac] [WordPress Trac] #50833: [PHP 8] GD resources are GdImage object instances

WordPress Trac noreply at wordpress.org
Sun Aug 16 15:26:37 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  |     Focuses:  coding-standards
----------------------------+-------------------------------

Comment (by jrf):

 @SergeyBiryukov Thanks for committing this.

 > Since some media functions can technically be called on front end, I'm
 wondering if `is_gd_image()` should be available on front end too.

 Good question and one I will freely admit I hadn't considered when
 reviewing.

 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 neede GD and therefor
 will need this function.

 Does that make sense ? Am I overlooking something ?


 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50833#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list