aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/text.php b/include/text.php
index f23458db0..fcd5dbc0c 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3035,13 +3035,14 @@ function create_table_from_array($table,$arr) {
if(! ($arr && $table))
return false;
- dbesc_array($arr);
-
- $r = dbq("INSERT INTO " . TQUOT . $table . TQUOT . " (" . TQUOT
+ if(dbesc_array($arr)) {
+ $r = dbq("INSERT INTO " . TQUOT . $table . TQUOT . " (" . TQUOT
. implode(TQUOT . ', ' . TQUOT, array_keys($arr))
. TQUOT . ") VALUES ('"
. implode("', '", array_values($arr))
- . "')" );
+ . "')"
+ );
+ }
return $r;
} \ No newline at end of file