aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-11-07 10:15:40 +0100
committerMario Vavti <mario@mariovavti.com>2018-11-07 10:15:40 +0100
commitc23dfa0d23ea479fc51ba27f948c1f4ee88e6c49 (patch)
tree4a9753b66e5a4788b0efc732b60db540fe4ce764 /include/text.php
parentb08de33b0bf6cb866f430899ea7769faaa560622 (diff)
parentf57fcefe6bc70ef06fcf61a204a15b142c030ac5 (diff)
downloadvolse-hubzilla-c23dfa0d23ea479fc51ba27f948c1f4ee88e6c49.tar.gz
volse-hubzilla-c23dfa0d23ea479fc51ba27f948c1f4ee88e6c49.tar.bz2
volse-hubzilla-c23dfa0d23ea479fc51ba27f948c1f4ee88e6c49.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'include/text.php')
-rw-r--r--include/text.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php
index 1d884593f..15cc0ca8a 100644
--- a/include/text.php
+++ b/include/text.php
@@ -3219,8 +3219,16 @@ function create_table_from_array($table, $arr, $binary_fields = []) {
if(! ($arr && $table))
return false;
+ $columns = db_columns($table);
+
$clean = [];
foreach($arr as $k => $v) {
+
+ if(! in_array($k,$columns)) {
+ continue;
+ }
+
+
$matches = false;
if(preg_match('/([^a-zA-Z0-9\-\_\.])/',$k,$matches)) {
return false;