mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-24192 fixed null default value in text fields
This commit is contained in:
parent
b809f81392
commit
559d79d25e
@ -478,7 +478,11 @@ class mssql_native_moodle_database extends moodle_database {
|
||||
|
||||
// Process defaults
|
||||
$info->has_default = !empty($rawcolumn->default_value);
|
||||
$info->default_value = preg_replace("/^[\(N]+[']?(.*?)[']?[\)]+$/", '\\1', $rawcolumn->default_value);
|
||||
if ($rawcolumn->default_value === NULL) {
|
||||
$info->default_value = NULL;
|
||||
} else {
|
||||
$info->default_value = preg_replace("/^[\(N]+[']?(.*?)[']?[\)]+$/", '\\1', $rawcolumn->default_value);
|
||||
}
|
||||
|
||||
// Process binary
|
||||
$info->binary = $info->meta_type == 'B' ? true : false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user