diff --git a/lib/validator/sfValidatorSchema.class.php b/lib/validator/sfValidatorSchema.class.php index 124e553f00..02e619d8e1 100644 --- a/lib/validator/sfValidatorSchema.class.php +++ b/lib/validator/sfValidatorSchema.class.php @@ -375,17 +375,18 @@ public function __clone() protected function getBytes($value) { $value = trim($value); + $size = (int) $value; switch (strtolower($value[strlen($value) - 1])) { // The 'G' modifier is available since PHP 5.1.0 case 'g': - $value *= 1024; + $size *= 1024; case 'm': - $value *= 1024; + $size *= 1024; case 'k': - $value *= 1024; + $size *= 1024; } - return $value; + return $size; } }