mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +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
|
||||
}
|
||||
$memoryNeeded = round(($imageInfo[0] * $imageInfo[1] * $imageInfo['bits'] * $channels / 8 + $K64 ) * $TWEAKFACTOR);
|
||||
$memoryLimit = self::returnBytes(ini_get('memory_limit'));
|
||||
if($memoryLimit < 0)
|
||||
$memoryLimit = ini_get('memory_limit');
|
||||
if($memoryLimit <= 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
$memoryLimit = self::returnBytes($memoryLimit);
|
||||
if($memoryLimit <= 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue