|
@@ -4705,18 +4705,20 @@ class Database
|
|
|
}
|
|
|
}
|
|
|
foreach ($update_add[$k] as $k1 => $v1) {
|
|
|
- $col = $update_col[$k][$k1];
|
|
|
+ $col = isset($update_col[$k][$k1]) ? $update_col[$k][$k1] : false;
|
|
|
foreach ($v1 as $k2 => $v2) {
|
|
|
- if (isset($update_set[$k][$k1][$k2]['set_' . $col])) {
|
|
|
- $update_set[$k][$k1][$k2]['set_' . $col] = $id;
|
|
|
- }
|
|
|
- if (isset($v2['add_' . $col])) {
|
|
|
- $v2['add_' . $col] = $id;
|
|
|
+ if ($col) {
|
|
|
+ if (isset($update_set[$k][$k1][$k2]['set_' . $col])) {
|
|
|
+ $update_set[$k][$k1][$k2]['set_' . $col] = $id;
|
|
|
+ }
|
|
|
+ if (isset($v2['add_' . $col])) {
|
|
|
+ $v2['add_' . $col] = $id;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
$check = false;
|
|
|
if (isset($update_id[$k][$k1][$k2])) {
|
|
|
- if (isset($update_id[$k][$k1][$k2][$col])) {
|
|
|
+ if ($col && isset($update_id[$k][$k1][$k2][$col])) {
|
|
|
$update_id[$k][$k1][$k2][$col] = $id;
|
|
|
}
|
|
|
$check = Dever::load($k1 . '-one', $update_id[$k][$k1][$k2]);
|