typemill / typemill

Typemill is a lightweight, flat-file CMS designed for simple, fast, and flexible website and eBook creation using Markdown.
https://typemill.net
MIT License
427 stars 60 forks source link

Slim Application Error when an invalid PNG file is encountered #403

Open joho1968 opened 11 months ago

joho1968 commented 11 months ago

While I was doing the initial setup, I specified a .png image that is not a valid .png image. This is the result:

[12-Jun-2023 15:38:59 Europe/Berlin] PHP Warning:  imagecreatefrompng(): "/var/www/typemill.test/_uploads/phpeUDwrD" is not a valid PNG file in /var/www/typemill.test/public_html/system/Models/ProcessImage.php on line 503              
[12-Jun-2023 15:38:59 Europe/Berlin] Slim Application Error:                                                                                                                                                                                 
Type: TypeError                                                                                                                                                                                                                              
Message: imagesx(): Argument #1 ($image) must be of type GdImage, bool given                                                                                                                                                                 
File: /var/www/typemill.test/public_html/system/Models/ProcessImage.php
trendschau commented 4 months ago

Ok, thank you for reporting, I will add a check in one of the next releases.