From c354bb931032a576fa14ec9e31103e987f75374c Mon Sep 17 00:00:00 2001 From: JediKev <kevin@enhancesoft.com> Date: Tue, 17 Jul 2018 09:29:28 -0500 Subject: [PATCH] issue: Maxfilesize Comma Crash This addresses an issue on the forums where having a comma in your number format (instead of periods) would crash the system if using a language pack other than English. (Fix suggested by @rspma on the forums.) --- include/class.forms.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/class.forms.php b/include/class.forms.php index a1d7a331d..1aaf87157 100644 --- a/include/class.forms.php +++ b/include/class.forms.php @@ -3932,7 +3932,7 @@ class FileUploadWidget extends Widget { allowedfiletypes: <?php echo JsonDataEncoder::encode( $mimetypes); ?>, maxfiles: <?php echo $config['max'] ?: 20; ?>, - maxfilesize: <?php echo $maxfilesize; ?>, + maxfilesize: <?php echo str_replace(',', '.', $maxfilesize); ?>, name: '<?php echo $name; ?>[]', files: <?php echo JsonDataEncoder::encode($files); ?> });}); -- GitLab