claviska / claviska/SimpleImage
Fatal error: Uncaught TypeError: imagesx(): Argument #1 ($image) must be of type GdImage
- Dominant language
- PHP
- Stars
- 1.4k
- Forks
- 377
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I got the following fatal err when converting some images with SimpleImage->bestFit().
Fatal error: Uncaught TypeError: imagesx(): Argument #1 ($image) must be of type GdImage, null given in D:\php\hvmenu\vendor\SimpleImage\SimpleImage.php on line 659 TypeError: imagesx(): Argument #1 ($image) must be of type GdImage, null given in D:\php\hvmenu\vendor\SimpleImage\SimpleImage.php on line 659 Call Stack: 0.0002 368272 1. {main}()
... claviska\SimpleImage->bestFit($maxWidth = 1920, $maxHeight = 1080)
... claviska\SimpleImage->getWidth()
SimpleImage.php:748 imagesx($image = NULL)
SimpleImage.php:659
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in SimpleImage.php at the imagesx() call reported on line 659 and the getWidth() call on line 748, then reproduce the failure through bestFit(). Trace why the image value is null for the affected input and define the expected handling; done means the conversion no longer produces this fatal TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100