]> git.mxchange.org Git - friendica.git/commitdiff
Issue 8635 - Handle weird default values
authorMichael <heluecht@pirati.ca>
Sat, 16 May 2020 14:23:17 +0000 (14:23 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 16 May 2020 14:23:17 +0000 (14:23 +0000)
This handles an issue that occured in #8635 (But will not fix the issue behind this)

src/Database/DBStructure.php

index 9a43c0624017b6a5706b9b9a7fbd3694e2455789..e75e2f58ccb286f6df23b56a1858affc89222c37 100644 (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'])) {