mirror of
https://github.com/itflow-org/itflow
synced 2026-07-24 17:30:43 +00:00
Update the rest of the PHP functions to use camelCase
This commit is contained in:
@@ -79,7 +79,7 @@ $phpConfig[] = [
|
||||
];
|
||||
|
||||
// Check upload_max_filesize and post_max_size >= 500M
|
||||
function return_bytes($val) {
|
||||
function toBytes($val) {
|
||||
$val = trim($val);
|
||||
$unit = strtolower(substr($val, -1));
|
||||
$num = (float)$val;
|
||||
@@ -99,8 +99,8 @@ $required_bytes = 500 * 1024 * 1024; // 500M in bytes
|
||||
$upload_max_filesize = ini_get('upload_max_filesize');
|
||||
$post_max_size = ini_get('post_max_size');
|
||||
|
||||
$upload_passed = return_bytes($upload_max_filesize) >= $required_bytes;
|
||||
$post_passed = return_bytes($post_max_size) >= $required_bytes;
|
||||
$upload_passed = toBytes($upload_max_filesize) >= $required_bytes;
|
||||
$post_passed = toBytes($post_max_size) >= $required_bytes;
|
||||
|
||||
$phpConfig[] = [
|
||||
'name' => 'upload_max_filesize >= 500M',
|
||||
@@ -116,7 +116,7 @@ $phpConfig[] = [
|
||||
|
||||
// PHP Memory Limit >= 128M
|
||||
$memoryLimit = ini_get('memory_limit');
|
||||
$memoryLimitBytes = return_bytes($memoryLimit);
|
||||
$memoryLimitBytes = toBytes($memoryLimit);
|
||||
$memoryLimitPassed = $memoryLimitBytes >= (128 * 1024 * 1024);
|
||||
$phpConfig[] = [
|
||||
'name' => 'PHP Memory Limit >= 128M',
|
||||
|
||||
Reference in New Issue
Block a user