Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.4.5, 3.6, 3.7, 3.8
-
Component/s: General
-
Database:Any
-
Testing Instructions:
-
Workaround:
-
Difficulty:Easy
-
Affected Branches:MOODLE_34_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
-
Fixed Branches:MOODLE_36_STABLE, MOODLE_37_STABLE
-
Pull from Repository:
-
Pull 3.5 Branch:
MDL-64975-35 -
Pull Master Branch:
MDL-64975-master -
Pull Master Diff URL:
Description
Bug description
Function format_float in lib/moodlelib.php does not work properly when the string decsep is set to a tilde character ('~').
First release in which this bug appeared: Moodle 2.3
Introduced in commit: 637da99edbd7258fae20374ed8c890a167f40d30
Source of the problem
Incorrect usage of function preg_quote.
How to fix
Replace
preg_quote($separator)
with
preg_quote($separator, '~')
in function format_float.