From d3defeb6ac6593134646447dfcb122c533472ce9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 1 Jun 2013 12:35:11 +0200 Subject: [PATCH] Fix decimal values in FileSizeOptionType --- .../files/lib/system/option/FileSizeOptionType.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/option/FileSizeOptionType.class.php b/wcfsetup/install/files/lib/system/option/FileSizeOptionType.class.php index ef2f38161a..c3f965364f 100644 --- a/wcfsetup/install/files/lib/system/option/FileSizeOptionType.class.php +++ b/wcfsetup/install/files/lib/system/option/FileSizeOptionType.class.php @@ -26,8 +26,9 @@ class FileSizeOptionType extends TextOptionType { */ public function getData(Option $option, $newValue) { $number = StringUtil::replace(WCF::getLanguage()->get('wcf.global.thousandsSeparator'), '', $newValue); - $d = preg_quote(WCF::getLanguage()->get('wcf.global.decimalPoint'), '~'); - if (!preg_match('~^(?:\d*)(?:'.$d.')?\d+~', $number, $matches)) return 0; + $number = StringUtil::replace(WCF::getLanguage()->get('wcf.global.decimalPoint'), '.', $number); + + if (!preg_match('~^(?:\d*)\.?\d+~', $number, $matches)) return 0; $number = $matches[0]; if (preg_match('/[kmgt]i?b$/i', $newValue, $multiplier)) { -- 2.20.1