1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 21:40:55 +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:
Wez Furlong 2012-11-20 17:19:26 -08:00
parent b2bf634795
commit df76ed9545

View file

@ -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();