aboutsummaryrefslogtreecommitdiffstats
path: root/include/text.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-11-05 16:57:32 -0800
committerzotlabs <mike@macgirvin.com>2018-11-05 16:57:32 -0800
commit43a5f928bae3d886dd355497d63ad961425cb3c4 (patch)
treed0a6b0c55b7a31ae8569646873a6fd961062f9e5 /include/text.php
parent73d2719330789c40d7b64fcc2e6ca2eec0d9deb6 (diff)
downloadvolse-hubzilla-43a5f928bae3d886dd355497d63ad961425cb3c4.tar.gz
volse-hubzilla-43a5f928bae3d886dd355497d63ad961425cb3c4.tar.bz2
volse-hubzilla-43a5f928bae3d886dd355497d63ad961425cb3c4.zip
these changes needed to ensure cloning/syncing works in the future to non-zot6 enabled servers after the (coming) zot6 schema updates. This should probably be on a fast track to master branch
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;