mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
Fix: Console image converter memory limit allocation
This commit is contained in:
parent
3ad27444f3
commit
e9d81a80f6
@ -73,6 +73,7 @@ HumHub Change Log
|
||||
- Enh: Directory view templates cleanups
|
||||
- Fix: All LDAP Users have been disabled and not reenabled by hourly cronjob if ldap server not reachable.
|
||||
- Enh: Cleanup authentication layout file
|
||||
- Fix: Console image converter memory limit allocation
|
||||
|
||||
1.2.0-beta.2 (February 24, 2017)
|
||||
--------------------------------
|
||||
|
@ -114,6 +114,12 @@ class ImageConverter
|
||||
list ($width, $height) = getimagesize($sourceFile);
|
||||
// get defined memory limit from php_ini
|
||||
$memoryLimit = ini_get('memory_limit');
|
||||
|
||||
// No memory limit set
|
||||
if ($memoryLimit == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
// calc needed size for processing image dimensions in Bytes.
|
||||
$neededMemory = floor(($width * $height * $bytesPerPixel * $tweakFactor + 1048576) / 1048576);
|
||||
$maxMemoryAllocation = Yii::$app->getModule('file')->settings->get(self::SETTINGS_NAME_MAX_MEMORY_ALLOCATION);
|
||||
|
Loading…
x
Reference in New Issue
Block a user