Nicolas Roeser
76a3cf95b7
MDL-64975 moodlelib: fix float formatting if decsep is ~ (tilde)
...
Commit 637da99edbd7258fae20374ed8c890a167f40d30 has introduced changes
for removing trailing zeroes from the output of function format_float.
Due to a small omission, the function causes a PHP warning when the
string decsep is set to a tilde character ('~'). This is rarely the
case.
The bug lies in using PHP function preg_replace with a string that
contains external input (in this case, including decsep), but without
escaping it for PCRE processing.
This commit fixes the function to also support a tilde character in
string decsep. It also adds tests for having tilde as decimal separator.
Thanks-To: Jake Dallimore <jake@moodle.com>
2019-06-14 13:05:39 +02:00
..
2019-06-06 09:31:01 +08:00
2019-06-07 09:37:34 +10:00
2019-05-20 19:35:05 +02:00
2019-06-07 10:38:49 +02:00
2018-08-28 23:15:36 +02:00
2019-06-13 18:04:59 +02:00
2019-06-11 10:04:01 +08:00
2019-04-09 22:39:02 +10:00
2019-04-03 22:08:16 +02:00
2019-05-20 19:35:05 +02:00
2018-12-18 09:40:29 +01:00
2019-04-10 12:35:28 +02:00
2019-04-03 13:39:28 +08:00
2019-05-05 22:27:50 +02:00
2018-04-23 23:21:06 +02:00
2019-06-07 07:38:41 +10:00
2018-10-31 00:17:59 +01:00
2018-11-27 16:40:35 +08:00
2018-10-08 09:00:08 +08:00
2018-11-07 17:25:03 +01:00
2019-03-05 04:24:53 +01:00
2019-06-06 19:07:55 +02:00
2019-06-10 08:28:43 +08:00
2019-05-06 13:33:42 +08:00
2019-02-01 11:56:05 +01:00
2019-04-03 10:44:24 +08:00
2019-03-22 09:24:04 +08:00
2019-01-24 09:28:21 +08:00
2018-10-31 00:17:59 +01:00
2019-05-09 11:32:19 +08:00
2019-05-28 11:11:29 +08:00
2019-06-14 13:05:39 +02:00
2019-02-01 11:56:05 +01:00
2019-01-31 11:31:57 +01:00
2019-04-11 12:02:43 +10:00
2018-09-20 17:41:22 +01:00
2019-06-12 08:47:55 +08:00
2019-04-10 12:35:28 +02:00
2019-06-11 13:44:58 +10:00
2019-04-15 23:53:58 +02:00
2019-05-10 15:51:27 +08:00
2019-04-03 19:47:11 +08:00
2019-04-30 20:47:26 +02:00
2018-08-28 11:36:23 +02:00
2019-02-06 22:26:44 +01:00
2019-04-16 22:37:23 +02:00
2019-04-10 12:35:28 +02:00
2019-03-18 11:20:08 +01:00
2018-10-05 13:36:26 +02:00
2018-06-22 10:29:23 +08:00
2019-03-26 16:26:06 +01:00
2019-05-30 22:41:37 +02:00
2018-11-14 16:04:31 +00:00
2019-05-05 22:27:50 +02:00
2019-03-27 11:21:50 +08:00
2019-01-22 16:42:18 +00:00
2019-05-06 11:03:14 +02:00
2018-10-24 08:00:00 +08:00
2018-06-26 10:25:44 +02:00
2019-04-25 18:55:45 +02:00
2018-12-12 14:03:45 +11:00
2019-06-14 13:05:39 +02:00
2019-04-10 12:35:28 +02:00
2018-11-16 11:43:16 +01:00
2019-04-23 13:16:15 +02:00
2019-06-10 13:56:51 +08:00
2019-06-05 18:44:46 +10:00
2019-06-12 08:47:55 +08:00
2019-04-03 19:34:17 +08:00
2019-01-03 01:17:17 +01:00
2019-03-27 11:37:51 +08:00
2019-05-01 16:27:34 +08:00
2019-05-01 10:30:22 +08:00
2018-11-08 22:55:33 +01:00
2019-04-01 16:48:22 +11:00
2019-06-09 23:24:26 +02:00
2019-06-13 07:39:03 +08:00
2019-04-04 16:08:26 +01:00
2019-06-11 10:15:43 +08:00
2019-06-11 09:49:18 +08:00
2019-04-03 09:48:00 +08:00
2019-04-23 13:16:15 +02:00