diff --git a/classes/Mail.php b/classes/Mail.php index c21ad4798..3b09a85f7 100644 --- a/classes/Mail.php +++ b/classes/Mail.php @@ -254,9 +254,7 @@ class MailCore $swift->disconnect(); return $send; } - - catch (Swift_ConnectionException $e) - { + catch (Swift_Exception $e) { return false; } } diff --git a/tools/swift/Swift/Message.php b/tools/swift/Swift/Message.php index 8ce2a2f92..3857ac671 100644 --- a/tools/swift/Swift/Message.php +++ b/tools/swift/Swift/Message.php @@ -620,7 +620,8 @@ class Swift_Message extends Swift_Message_Mime case "mixed": $this->getReference("mixed", $tag)->addChild($ref, $id, $sign); break; } - $this->getReference("parent", $old_branch)->removeChild($id); + if ($this->getReference("parent", $old_branch)->hasChild($id)) + $this->getReference("parent", $old_branch)->removeChild($id); } $this->setReference("parent", $old_branch, $new); //parentRefs[$old_branch] = $new; }