summaryrefslogtreecommitdiffstatshomepage
path: root/src/SemanticScuttle/Service/Tag2Tag.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/SemanticScuttle/Service/Tag2Tag.php')
-rw-r--r--src/SemanticScuttle/Service/Tag2Tag.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/SemanticScuttle/Service/Tag2Tag.php b/src/SemanticScuttle/Service/Tag2Tag.php
index 9a5d0f2..d404bb5 100644
--- a/src/SemanticScuttle/Service/Tag2Tag.php
+++ b/src/SemanticScuttle/Service/Tag2Tag.php
@@ -94,7 +94,15 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_DbService
);
return false;
}
- $this->db->sql_transaction('commit');
+
+ if (!$this->db->sql_transaction('commit')) {
+ $this->db->sql_transaction('rollback');
+ message_die(
+ GENERAL_ERROR, 'Could not commit attaching tag to tag',
+ '', __LINE__, __FILE__, $query, $this->db
+ );
+ return false;
+ }
// Update stats and cache
$this->update($tag1, $tag2, $relationType, $uId);