From f0d0ef216929abec97b5c2b7699f250d4dbdb31e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 29 Aug 2015 13:44:36 +0200 Subject: [PATCH] Fix up AbstractWatchedObjectImporter This fixes up commit a3d486408bf1ce30aa88223a75e2d7fa2da6bc0f --- .../system/importer/AbstractWatchedObjectImporter.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/importer/AbstractWatchedObjectImporter.class.php b/wcfsetup/install/files/lib/system/importer/AbstractWatchedObjectImporter.class.php index ff1c719aa7..ba4cf11a63 100644 --- a/wcfsetup/install/files/lib/system/importer/AbstractWatchedObjectImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/AbstractWatchedObjectImporter.class.php @@ -34,6 +34,7 @@ class AbstractWatchedObjectImporter extends AbstractImporter { try { $watch = UserObjectWatchEditor::create(array_merge($data, array('objectTypeID' => $this->objectTypeID))); + return $watch->watchID; } catch (DatabaseException $e) { // 23000 = INTEGRITY CONSTRAINT VIOLATION a.k.a. duplicate key @@ -42,6 +43,6 @@ class AbstractWatchedObjectImporter extends AbstractImporter { } } - return $watch->watchID; + return 0; } } -- 2.20.1