mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 20:26:42 +00:00
Hotfix (will be included in v2.5.0 release): Don't break image loading when php-gd extension is not installed
This commit is contained in:
@@ -75,7 +75,7 @@
|
|||||||
- Fixed that date/time pickers not considered the `config.php` setting `CALENDAR_FIRST_DAY_OF_WEEK`
|
- Fixed that date/time pickers not considered the `config.php` setting `CALENDAR_FIRST_DAY_OF_WEEK`
|
||||||
- Improved the handling which entry page to use with disabled feature flags (thanks @nielstholenaar)
|
- Improved the handling which entry page to use with disabled feature flags (thanks @nielstholenaar)
|
||||||
- Boolean settings provided via environment variables (so the strings `true` and `false`) are now parsed correctly (thanks @mduret)
|
- Boolean settings provided via environment variables (so the strings `true` and `false`) are now parsed correctly (thanks @mduret)
|
||||||
- All uploaded pictures (currently for products and recipes) are now automatically downscaled to the appropriate size when serving them to improve page load times
|
- All uploaded pictures (currently for products and recipes) are now automatically downscaled to the appropriate size when serving them to improve page load times (this requires the `php-gd` extension, if not installed, images will not be downscaled)
|
||||||
- It's now possible to test plural forms of quantity units (button on the quantity unit edit page, only visible if the current language requires more than 2 plural forms)
|
- It's now possible to test plural forms of quantity units (button on the quantity unit edit page, only visible if the current language requires more than 2 plural forms)
|
||||||
- On the login page no menus and the sidebar is now hidden
|
- On the login page no menus and the sidebar is now hidden
|
||||||
- New translations: (thanks all the translators)
|
- New translations: (thanks all the translators)
|
||||||
|
@@ -42,6 +42,11 @@ class FilesService extends BaseService
|
|||||||
$fileNameDownscaled = $fileNameWithoutExtension . '__downscaledto' . ($bestFitHeight ? $bestFitHeight : 'auto') . 'x' . ($bestFitWidth ? $bestFitWidth : 'auto') . '.' . $fileExtension;
|
$fileNameDownscaled = $fileNameWithoutExtension . '__downscaledto' . ($bestFitHeight ? $bestFitHeight : 'auto') . 'x' . ($bestFitWidth ? $bestFitWidth : 'auto') . '.' . $fileExtension;
|
||||||
$filePathDownscaled = $this->GetFilePath($group, $fileNameDownscaled);
|
$filePathDownscaled = $this->GetFilePath($group, $fileNameDownscaled);
|
||||||
|
|
||||||
|
if (!extension_loaded('gd'))
|
||||||
|
{
|
||||||
|
return $filePath;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!file_exists($filePathDownscaled))
|
if (!file_exists($filePathDownscaled))
|
||||||
|
Reference in New Issue
Block a user