X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=xml%2FGenCode.php;h=0f994a9b25b8721d321d1b41280e5cd8b457bcec;hb=b863b16436bd6aa0ba3d2effd1065b2b77083fb0;hp=9a2fb79bd63c63ce3362ee0159fade7bb70b7b4d;hpb=af321125666c7444accea956adaad22395fcd4c9;p=civicrm-core.git diff --git a/xml/GenCode.php b/xml/GenCode.php index 9a2fb79bd6..0f994a9b25 100644 --- a/xml/GenCode.php +++ b/xml/GenCode.php @@ -2,12 +2,15 @@ ini_set('include_path', '.' . PATH_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'packages' . PATH_SEPARATOR . '..'); // make sure the memory_limit is at least 512 MB $memLimitString = trim(ini_get('memory_limit')); -$memLimitUnit = strtolower(substr($memLimitString, -1)); -$memLimit = (int) $memLimitString; +$memLimitUnit = strtolower(substr($memLimitString, -1)); +$memLimit = (int) $memLimitString; switch ($memLimitUnit) { - case 'g': $memLimit *= 1024; - case 'm': $memLimit *= 1024; - case 'k': $memLimit *= 1024; + case 'g': + $memLimit *= 1024; + case 'm': + $memLimit *= 1024; + case 'k': + $memLimit *= 1024; } if ($memLimit >= 0 and $memLimit < 536870912) {