From: Tim Düsterhus Date: Sat, 29 Aug 2015 11:44:36 +0000 (+0200) Subject: Fix up AbstractWatchedObjectImporter X-Git-Tag: 2.1.7~16 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f0d0ef216929abec97b5c2b7699f250d4dbdb31e;p=GitHub%2FWoltLab%2FWCF.git Fix up AbstractWatchedObjectImporter This fixes up commit a3d486408bf1ce30aa88223a75e2d7fa2da6bc0f --- 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; } }