]> git.mxchange.org Git - friendica.git/commitdiff
Replace more is_null with empty in DBStructure
authorHypolite Petovan <mrpetovan@gmail.com>
Tue, 3 Jul 2018 02:42:15 +0000 (22:42 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Tue, 3 Jul 2018 02:42:15 +0000 (22:42 -0400)
src/Database/DBStructure.php

index dc570f3135edfafc8af958a03c12c05c7a924bdc..d4cb9cf58b017e4394b02df4679fe89c6ac2619c 100644 (file)
@@ -413,7 +413,7 @@ class DBStructure
                                        $field_definition = $database[$name]["fields"][$fieldname];
 
                                        // Define the default collation if not given
-                                       if (!isset($parameters['Collation']) && !is_null($field_definition['Collation'])) {
+                                       if (!isset($parameters['Collation']) && !empty($field_definition['Collation'])) {
                                                $parameters['Collation'] = 'utf8mb4_general_ci';
                                        } else {
                                                $parameters['Collation'] = null;
@@ -580,7 +580,7 @@ class DBStructure
                        }
                }
 
-               if (!is_null($structure["indexes"])) {
+               if (!empty($structure["indexes"])) {
                        foreach ($structure["indexes"] AS $indexname => $fieldnames) {
                                $sql_index = self::createIndex($indexname, $fieldnames, "");
                                if (!is_null($sql_index)) {
@@ -589,11 +589,11 @@ class DBStructure
                        }
                }
 
-               if (!is_null($structure["engine"])) {
+               if (!empty($structure["engine"])) {
                        $engine = " ENGINE=" . $structure["engine"];
                }
 
-               if (!is_null($structure["comment"])) {
+               if (!empty($structure["comment"])) {
                        $comment = " COMMENT='" . dbesc($structure["comment"]) . "'";
                }