From f065f3a0b867080ee6854a7af7d79acd2b4d0d97 Mon Sep 17 00:00:00 2001 From: Niek van der Kooy Date: Fri, 5 Aug 2016 20:53:09 +0200 Subject: [PATCH] Make phpBytes case insensitive, since php.ini can contain both capitals and small letters --- app/Support/Steam.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Support/Steam.php b/app/Support/Steam.php index 9dda968cb1..3b2a140dc4 100644 --- a/app/Support/Steam.php +++ b/app/Support/Steam.php @@ -206,16 +206,16 @@ class Steam { $string = strtolower($string); - if (!(strpos($string, 'k') === false)) { + if (!(stripos($string, 'k') === false)) { // has a K in it, remove the K and multiply by 1024. - $bytes = bcmul(rtrim($string, 'k'), '1024'); + $bytes = bcmul(rtrim($string, 'kK'), '1024'); return intval($bytes); } - if (!(strpos($string, 'm') === false)) { + if (!(stripos($string, 'm') === false)) { // has a M in it, remove the M and multiply by 1048576. - $bytes = bcmul(rtrim($string, 'm'), '1048576'); + $bytes = bcmul(rtrim($string, 'mM'), '1048576'); return intval($bytes); }