From 43a5f928bae3d886dd355497d63ad961425cb3c4 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 5 Nov 2018 16:57:32 -0800 Subject: 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 --- include/text.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/text.php') 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; -- cgit v1.2.3