Merge pull request #8643 from annando/annando/issue8635

Issue 8635 - Handle weird default values
This commit is contained in:
Hypolite Petovan 2020-05-16 10:48:35 -04:00 committed by GitHub
commit 9ccbbe0acc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -732,8 +732,8 @@ class DBStructure
$fielddata[$field['COLUMN_NAME']]['not null'] = true;
}
if (isset($field['COLUMN_DEFAULT'])) {
$fielddata[$field['COLUMN_NAME']]['default'] = $field['COLUMN_DEFAULT'];
if (isset($field['COLUMN_DEFAULT']) && ($field['COLUMN_DEFAULT'] != 'NULL')) {
$fielddata[$field['COLUMN_NAME']]['default'] = trim($field['COLUMN_DEFAULT'], "'");
}
if (!empty($field['EXTRA'])) {