#51174 closed defect (bug) (fixed)
wp 5.6 missing function is_gd_image
| Reported by: | BackuPs | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 5.6 |
| Component: | Media | Version: | 5.6 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
Hi
In wordpress 5.6 i get this error
Uncaught Error: Call to undefined function is_gd_image() in /var/docs/server.tst/public/wp-includes/media.php:3475 Stack trace:
The function does not seem to exists and there is no check added before calling it.
Thank you for creating with WordPress.
You are using a development version (5.6-alpha-48899).
Please provide a fix
Change History (7)
#2
@
6 years ago
- Component General → Media
- Keywords reporter-feedback added
- Milestone Awaiting Review → 5.6
Thanks for the report!
The function was added in [48798] / #50833.
As noted in comment:7:ticket:50833, while some media functions can be called on front end, is_gd_image() is currently only defined in the admin, and should probably be available on front end too.
Could you share some details about how you're using wp_imagecreatetruecolor()? Is it for image creation or editing on front end?
#3
@
6 years ago
@SergeyBiryukov
Yes we have a buildin image resizing that kicks in while users load a page in the front end and or resize their screens.
Please consider adding the function is_gd_image() also for the wordpress front-end
Thank you
#4
@
6 years ago
- Keywords needs-patch added; reporter-feedback removed
- Owner set to
- Status new → accepted
That helps, thanks :)
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
it seems to happen calling this function wp_imagecreatetruecolor()
if i change the code is_gd_image back to is_resource then it works fine.