diff options
Diffstat (limited to 'include/items.php')
-rw-r--r-- | include/items.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/items.php b/include/items.php index 223fba147..12b543697 100644 --- a/include/items.php +++ b/include/items.php @@ -2392,9 +2392,14 @@ function item_store_update($arr, $allow_exec = false, $deliver = true) { logger('item_store_update: ' . print_r($arr,true), LOGGER_DATA); - $str = ''; - foreach($arr as $k => $v) { - if($str) + $columns = db_columns('item'); + $str = ''; + foreach ($arr as $k => $v) { + if (!in_array($k, $columns)) { + continue; + } + + if ($str) $str .= ","; $str .= " " . TQUOT . $k . TQUOT . " = '" . $v . "' "; } |