Merge branch 'MDL-74656-400-fix' of https://github.com/paulholden/moodle into MOODLE_400_STABLE

This commit is contained in:
Jun Pataleta
2022-07-27 16:37:38 +08:00
@@ -96,6 +96,9 @@ abstract class base {
// We need to ensure all values are char (this ought to be done in the DML drivers, see MDL-72184).
switch ($DB->get_dbfamily()) {
case 'mssql' :
$sqlfield = $DB->sql_concat("''", $sqlfield);
break;
case 'postgres' :
$sqlfield = "CAST({$sqlfield} AS VARCHAR)";
break;