]> git.mxchange.org Git - friendica.git/commitdiff
Issue 8958: Ensure to have no foreign key violation
authorMichael <heluecht@pirati.ca>
Thu, 17 Sep 2020 19:10:45 +0000 (19:10 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 17 Sep 2020 19:10:45 +0000 (19:10 +0000)
src/Worker/MergeContact.php

index 6fdb0140bc04f157e36feff15ef2a8f3e4071ada..3bb4e7e689930e3b0a36520e57421fe02238113e 100644 (file)
@@ -52,6 +52,7 @@ class MergeContact
                // These fields only contain public contact entries (uid = 0)
                if ($uid == 0) {
                        DBA::update('post-tag', ['cid' => $new_cid], ['cid' => $old_cid]);
+                       DBA::delete('post-tag', ['cid' => $old_cid]);
                        DBA::update('item', ['author-id' => $new_cid], ['author-id' => $old_cid]);
                        DBA::update('item', ['owner-id' => $new_cid], ['owner-id' => $old_cid]);
                        DBA::update('thread', ['author-id' => $new_cid], ['author-id' => $old_cid]);