From 00c3252a1d66bc1b4bc46b80901c0540a37e1dce Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 30 Jul 2020 18:03:14 +0200 Subject: [PATCH] New method that will ignore duplicate key errors while inserting rows into the database --- .../lib/data/DatabaseObjectEditor.class.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/wcfsetup/install/files/lib/data/DatabaseObjectEditor.class.php b/wcfsetup/install/files/lib/data/DatabaseObjectEditor.class.php index 19cea93519..1126fae67d 100644 --- a/wcfsetup/install/files/lib/data/DatabaseObjectEditor.class.php +++ b/wcfsetup/install/files/lib/data/DatabaseObjectEditor.class.php @@ -1,5 +1,6 @@ getCode() == '23000') { + return null; + } + + throw $e; + } + } } -- 2.20.1