mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Fix FileHandler::checkMemoryLoadImage() returning false if memory_limit is actually unlimited
This commit is contained in:
parent
633bc340e7
commit
93fa7a46ce
1 changed files with 7 additions and 2 deletions
|
|
@ -467,8 +467,13 @@ class FileHandler
|
||||||
$channels = 6; //for png
|
$channels = 6; //for png
|
||||||
}
|
}
|
||||||
$memoryNeeded = round(($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $channels / 8 + $K64 ) * $TWEAKFACTOR);
|
$memoryNeeded = round(($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $channels / 8 + $K64 ) * $TWEAKFACTOR);
|
||||||
$memoryLimit = self::returnBytes(ini_get('memory_limit'));
|
$memoryLimit = ini_get('memory_limit');
|
||||||
if($memoryLimit < 0)
|
if($memoryLimit <= 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
$memoryLimit = self::returnBytes($memoryLimit);
|
||||||
|
if($memoryLimit <= 0)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue