Image
Image copied to clipboard
[PHP7] Undefined constant 'IMG_JPG'
When I try to run my application on php7, I got this error on runtime image rendering:
Fatal error: Undefined constant 'IMG_JPG'
500 Internal Server Error - FatalThrowableError
1. in vendor/gregwar/image/Gregwar/Image/Image.php at line 285
2. at Image ->setAdapter ('gd')
in vendor/gregwar/image/Gregwar/Image/Image.php at line 269
...
Have to test, but I think this is because my PHP version is possibly not compiled with GD.
http://php.net/manual/fr/function.imagetypes.php
BTW, a proper error throw by the library would be better like "GD library is not installed" in this case.
You can clearly see that in the phpinfo Do not hesitate to open a pr for gd checking
I have the same bug on php 7 without gd. After compile and enable gd - all worked fine.