claviska / claviska/SimpleImage
PHP E_WARNING when imagecreatefromstring() is used
- Dominant language
- PHP
- Stars
- 1.4k
- Forks
- 377
- PR merge metrics
- No merged PRs in 30d
Description
In class `SimpleImage` the php internal function `imagecreatefromstring()` raises php warnings if the data is invalid:
```
E_WARNING: imagecreatefromstring(): Data is not in a recognized format
```
The function is used in two methods: `fromDataUri()` and `fromFile()`
Please change to `@imagecreatefromstring()` and throw an exception if result is false (see https://www.php.net/manual/en/function.imagecreatefromstring.php)
Thanks!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in the SimpleImage class, locating the fromDataUri() and fromFile() methods where imagecreatefromstring() is used. Check the PHP manual behavior for invalid data, then verify that invalid image data no longer emits a warning and instead produces an exception when the function returns false.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100