diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Bridge.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Bridge.php b/src/Bridge.php index e46013d..3884154 100644 --- a/src/Bridge.php +++ b/src/Bridge.php @@ -68,7 +68,6 @@ class Bridge { . $this->quote($references) . ')'; $count = $this->db->exec($sql); - return $count == 1; } @@ -78,9 +77,11 @@ class Bridge { $sql = 'DELETE FROM posts WHERE message_id = ' . $this->db->quote($messageId); - $coult = $this->db->exec($sql); + $count = $this->db->exec($sql); - return $count == 1; + if ($count != 1) { + throw new Exception('Failed to delete message id: ' . $messageId); + } } protected function get_exactly_one_row($sql) { |