1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Merge branch '5.7.x' into master

This commit is contained in:
Bruce Weirdan 2023-02-24 21:19:43 -04:00
commit 59e549d2e8
No known key found for this signature in database
GPG Key ID: CFC3AAB181751B0D

View File

@ -87,6 +87,10 @@ class PsalmRestarter extends XdebugHandler
private static function toBytes(string $value): int private static function toBytes(string $value): int
{ {
if (strlen($value) === 0) {
return 0;
}
$unit = strtolower($value[strlen($value) - 1]); $unit = strtolower($value[strlen($value) - 1]);
if (in_array($unit, ['g', 'm', 'k'], true)) { if (in_array($unit, ['g', 'm', 'k'], true)) {