[wp-trac] [WordPress Trac] #50833: [PHP 8] GD resources are GdImage object instances
WordPress Trac
noreply at wordpress.org
Thu Aug 13 09:27:19 UTC 2020
#50833: [PHP 8] GD resources are GdImage object instances
----------------------------+-------------------------------
Reporter: ayeshrajans | Owner: SergeyBiryukov
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 5.6
Component: Media | Version:
Severity: normal | Resolution:
Keywords: php8 has-patch | Focuses: coding-standards
----------------------------+-------------------------------
Comment (by ayeshrajans):
Thanks a lot for this thorough review and detailed reply @jrf.
You are absolutely right the function description was not very good, so I
rewrote the doc block to add more clarity and meaning, and to work on the
points you mentioned in the comment above.
- `is_gd_image()` now checks the type of the resource as well.
- Added a new test to check for truthy values for `is_gd_image()`, and it
`@requires extendion gd`.
- There is an additional test with a `fopen` resource (closed after the
test).
(Patch attached in next comment).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50833#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list