diff --git a/CHANGELOG.md b/CHANGELOG.md index da8d37c1b..fb4d30130 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## [Unreleased] +### FIX + +- `WEB_CONCURRENCY` auto-tuning may warn about an invalid suffix for certain available memory values [David Zuelke] ## [v245] - 2024-02-09 diff --git a/bin/util/autotune.php b/bin/util/autotune.php index a2beb8ad4..ec96cb5e8 100755 --- a/bin/util/autotune.php +++ b/bin/util/autotune.php @@ -11,9 +11,10 @@ function stringtobytes($amount) { case 'k': $amount = (int)$amount * 1024; break; - case !is_numeric($suffix): - fprintf(STDERR, "WARNING: ignoring invalid suffix '%s' in 'memory_limit' value '%s'\n", $suffix, $amount); default: + if(!is_numeric($suffix)) { + fprintf(STDERR, "WARNING: ignoring invalid suffix '%s' in 'memory_limit' value '%s'\n", $suffix, $amount); + } $amount = (int)$amount; } return $amount;