- Issue created by @radheymkumar
- 🇺🇸United States smustgrave
Fixes should be in MRs vs patches.
Issue summary appears to be incomplete, missing steps to reproduce
Also will need test coverage.
Drupal version is 10.2.4, PHP is 8.3.
[warning] imagecreatefrompng(): gd-png: fatal libpng error: Read Error: truncated data
> GDToolkit.php:271
> [warning] imagecreatefrompng(): gd-png error: setjmp returns error condition 3
> GDToolkit.php:271
> [warning] imagecreatefrompng(): "azblob://inline-images/consumer-goods.png" is not a valid PNG file GDToolkit.php:271
> [warning] The image toolkit 'gd' failed processing 'scale' for image 'azblob://inline-images/consumer-goods.png'. Reported error: TypeError - Drupal\system\Plugin\ImageToolkit\GDToolkit::setImage(): Argument #1 ($image) must be of type ?GdImage, false given, called in /var/www/html/localhost/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php on line 284
> [error] Image scale failed using the gd toolkit on azblob://inline-images/consumer-goods.png (image/png, 1319x1022)
> [warning] imagecreatefrompng(): gd-png: fatal libpng error: Read Error: truncated data
> GDToolkit.php:271
> [warning] imagecreatefrompng(): gd-png error: setjmp returns error condition 3
> GDToolkit.php:271
> [warning] imagecreatefrompng(): "azblob://inline-images/consumer-goods.png" is not a valid PNG file GDToolkit.php:271
[error] TypeError: Drupal\system\Plugin\ImageToolkit\GDToolkit::setImage(): Argument #1 ($image) must be of type ?GdImage, false given, called in /var/www/html/localhost/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php on line 284 in Drupal\system\Plugin\ImageToolkit\GDToolkit->setImage() (line 201 of /var/www/html/localhost/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php) #0 /var/www/html/localhost/core/modules/system/src/Plugin/ImageToolkit/GDToolkit.php(284): Drupal\system\Plugin\ImageToolkit\GDToolkit->setImage()
Add checking for boolean result of the function.
Review my PR, give feedback, merge if possible.
Active
10.2 ✨
plugin system
Fixes should be in MRs vs patches.
Issue summary appears to be incomplete, missing steps to reproduce
Also will need test coverage.