]> git.mxchange.org Git - friendica.git/commitdiff
dbstructure: check for comment value or use default
authorfabrixxm <fabrix.xm@gmail.com>
Sat, 17 Nov 2018 10:43:01 +0000 (11:43 +0100)
committerfabrixxm <fabrix.xm@gmail.com>
Sat, 17 Nov 2018 10:43:01 +0000 (11:43 +0100)
fix #6119

src/Database/DBStructure.php

index 4a9bc69f618e14f1a4a2896497da01f11c941fa0..d4a1ee937fcedc759ca5c0ae658b27e0794339b6 100644 (file)
@@ -329,8 +329,9 @@ class DBStructure
                                }
 
                                if (isset($database[$name]["table_status"]["Comment"])) {
-                                       if ($database[$name]["table_status"]["Comment"] != $structure['comment']) {
-                                               $sql2 = "COMMENT = '".DBA::escape($structure['comment'])."'";
+                                       $structurecomment = defaults($structure, "comment", "");
+                                       if ($database[$name]["table_status"]["Comment"] != $structurecomment) {
+                                               $sql2 = "COMMENT = '".DBA::escape($structurecomment)."'";
 
                                                if ($sql3 == "") {
                                                        $sql3 = "ALTER" . $ignore . " TABLE `".$temp_name."` ".$sql2;