Fix up AbstractWatchedObjectImporter
authorTim Düsterhus <duesterhus@woltlab.com>
Sat, 29 Aug 2015 11:44:36 +0000 (13:44 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Sat, 29 Aug 2015 11:44:36 +0000 (13:44 +0200)
This fixes up commit a3d486408bf1ce30aa88223a75e2d7fa2da6bc0f

wcfsetup/install/files/lib/system/importer/AbstractWatchedObjectImporter.class.php

index ff1c719aa78345d33d15ae580ca8ab5fcc271615..ba4cf11a63f373c692ad93b566597024006134bf 100644 (file)
@@ -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;
        }
 }