Skip to content

Commit 9e006b3

Browse files
committed
Merge branch 'master' of ssh://github.com/LiveHelperChat/livehelperchat
2 parents cef5ffc + e5c6381 commit 9e006b3

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎lhc_web/lib/core/lhcore/lhdbtrait.php‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ public function syncAndLock($columnsToSync = '*')
6666

6767
if (is_array($data)) {
6868
$this->setState($data);
69+
70+
// Drop decoded copies (e.g. chat_variables_array) cached by __get before the lock,
71+
// so they are rebuilt from the freshly locked row.
72+
foreach ($data as $key => $value) {
73+
if (!array_key_exists($key . '_array', $data) && property_exists($this, $key . '_array')) {
74+
unset($this->{$key . '_array'});
75+
}
76+
}
6977
}
7078
}
7179

0 commit comments

Comments
 (0)