1
0
mirror of https://github.com/mrclay/minify.git synced 2025-01-17 13:18:13 +01:00

Merge pull request #600 from Quetzacoalt91/2.x

Cast value as int for PHP 7.1
This commit is contained in:
Elan Ruusamäe 2017-06-08 20:42:07 +03:00 committed by GitHub
commit 32150b84b6

View File

@ -766,12 +766,12 @@ class CSSmin
{
if (is_string($size)) {
switch (substr($size, -1)) {
case 'M': case 'm': return $size * 1048576;
case 'K': case 'k': return $size * 1024;
case 'G': case 'g': return $size * 1073741824;
case 'M': case 'm': return (int) $size * 1048576;
case 'K': case 'k': return (int) $size * 1024;
case 'G': case 'g': return (int) $size * 1073741824;
}
}
return (int) $size;
}
}
}