Skip to content

Commit aa8d396

Browse files
committed
Truncate Stash table before module update, as changing indexes can throw an error with existing data
1 parent 0236e3d commit aa8d396

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

system/expressionengine/third_party/stash/upd.stash.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ public function update($current = '')
142142

143143
$sql = array();
144144

145+
// always flush the Stash table first
146+
$sql[] = "TRUNCATE TABLE `{$this->EE->db->dbprefix}stash`";
147+
145148
// Update to 2.3.7
146149
if (version_compare($current, '2.3.7', '<'))
147150
{

0 commit comments

Comments
 (0)