Fixed bug that caused memory_limit=-1 to lead to 'not enough memory' … (#1)

* Fixed bug that caused memory_limit=-1 to lead to 'not enough memory' error
* Added Unit Test to Memory Limit Check
This commit is contained in:
Dennis Lassiter
2018-09-06 10:04:28 +02:00
committed by Pierre Goiffon
parent b8f8a0d455
commit 49bb8fd515
5 changed files with 2399 additions and 2334 deletions

View File

@@ -274,7 +274,7 @@ class SetupUtils
// Check that the limit will allow us to load the data
//
$iMemoryLimit = utils::ConvertToBytes($sMemoryLimit);
if ($iMemoryLimit < self::MIN_MEMORY_LIMIT)
if (!utils::IsMemoryLimitOk($iMemoryLimit, self::MIN_MEMORY_LIMIT))
{
$aResult[] = new CheckResult(CheckResult::ERROR, "memory_limit ($iMemoryLimit) is too small, the minimum value to run the application is ".self::MIN_MEMORY_LIMIT.".");
}