If the ! is_numeric() case statement evaluates to false, and the suffix is a 0 (e.g. because the input value is "2684354560" a.k.a. 2.5 GiB), it matches, and prints the warning.
This is not how case statements work (they simply weak-comparison match the switch value against the case expression). The check was supposed to be in the default block all along.
If the
! is_numeric()
case statement evaluates tofalse
, and the suffix is a0
(e.g. because the input value is "2684354560" a.k.a. 2.5 GiB), it matches, and prints the warning.This is not how case statements work (they simply weak-comparison match the switch value against the case expression). The check was supposed to be in the default block all along.