Merge branch 'MDL-63252-master' of git://github.com/lameze/moodle into master

This commit is contained in:
Eloy Lafuente (stronk7) 2020-07-30 00:47:40 +02:00
commit 8d1785fec5

View File

@ -93,6 +93,17 @@ class check_defaults extends XMLDBCheckAction {
$physicaldefault = null;
}
// For number fields there are issues with type differences, so let's convert
// everything to a float.
if ($xmldbfield->getType() === XMLDB_TYPE_NUMBER) {
if ($physicaldefault !== null) {
$physicaldefault = (float) $physicaldefault;
}
if ($xmldbdefault !== null) {
$xmldbdefault = (float) $xmldbdefault;
}
}
// There *is* a default and it's wrong.
if ($physicaldefault !== $xmldbdefault) {
$xmldbtext = self::display_default($xmldbdefault);