Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check for image before calling imagecreatefromstring()
The current code can run into a few conditions where the end result is that `imagecreatefromstring()` is called on something that isn't actually an image. I found two conditions where that happens. The first is where we end up with a NULL value at the end. The second is where a remote image is requested, but what you get back is something else ( like the HTML for an error page ). This update adds checks to defend against both of those possible error conditions.
- Loading branch information