mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
be careful of received mail object in error cases too
Summary: we're tracking down a fatal caused by the mandatory attachments array parameter change in the reply handler and yo dawg, heard you like to fatal in your fatal. Test Plan: internal test scenario with xmail -> phabricator triggered manually. Reviewers: nh, vrana, epriestley Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D4005
This commit is contained in:
parent
b2bf634795
commit
df76ed9545
1 changed files with 6 additions and 1 deletions
|
@ -147,10 +147,15 @@ class DifferentialReplyHandler extends PhabricatorMailReplyHandler {
|
|||
return $comment->getID();
|
||||
|
||||
} catch (Exception $ex) {
|
||||
if ($this->receivedMail) {
|
||||
$error_body = $this->receivedMail->getRawTextBody();
|
||||
} else {
|
||||
$error_body = $body;
|
||||
}
|
||||
$exception_mail = new DifferentialExceptionMail(
|
||||
$this->getMailReceiver(),
|
||||
$ex,
|
||||
$this->receivedMail->getRawTextBody());
|
||||
$error_body);
|
||||
|
||||
$exception_mail->setToPHIDs(array($this->getActor()->getPHID()));
|
||||
$exception_mail->send();
|
||||
|
|
Loading…
Reference in a new issue