From 64cd3484e47ba92c77cbcb5c3a3538795ddf6a0d Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 31 Jul 2020 17:29:09 +0200 Subject: [PATCH] Improved detection of duplicate key errors --- wcfsetup/install/files/lib/data/DatabaseObjectEditor.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/data/DatabaseObjectEditor.class.php b/wcfsetup/install/files/lib/data/DatabaseObjectEditor.class.php index 1126fae67d..107e989ad5 100644 --- a/wcfsetup/install/files/lib/data/DatabaseObjectEditor.class.php +++ b/wcfsetup/install/files/lib/data/DatabaseObjectEditor.class.php @@ -138,7 +138,7 @@ abstract class DatabaseObjectEditor extends DatabaseObjectDecorator implements I } catch (DatabaseQueryExecutionException $e) { // Error code 23000 = duplicate key - if ($e->getCode() == '23000') { + if ($e->getCode() == '23000' && $e->getDriverCode() == '1062') { return null; } -- 2.20.1