From: Michael Date: Sat, 16 May 2020 14:23:17 +0000 (+0000) Subject: Issue 8635 - Handle weird default values X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b8cf415f0d1133404d9d342471ef757b23093c5e;p=friendica.git Issue 8635 - Handle weird default values This handles an issue that occured in #8635 (But will not fix the issue behind this) --- diff --git a/src/Database/DBStructure.php b/src/Database/DBStructure.php index 9a43c06240..e75e2f58cc 100644 --- a/src/Database/DBStructure.php +++ b/src/Database/DBStructure.php @@ -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'])) {