1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Application Emails - conditionally pass around the application email

Summary: due to typehints, passing null is going to barf here. Ref D11564, ref T5039.

Test Plan: made an edit to a task from the web ui and it didnt fatal

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T5039

Differential Revision: https://secure.phabricator.com/D11571
This commit is contained in:
Bob Trahan 2015-01-29 14:35:22 -08:00
parent c2efa9065c
commit 1077e7a80c
3 changed files with 11 additions and 5 deletions

View file

@ -41,7 +41,9 @@ final class ManiphestCreateMailReceiver extends PhabricatorMailReceiver {
$handler->setActor($sender);
$handler->setExcludeMailRecipientPHIDs(
$mail->loadExcludeMailRecipientPHIDs());
$handler->setApplicationEmail($this->getApplicationEmail());
if ($this->getApplicationEmail()) {
$handler->setApplicationEmail($this->getApplicationEmail());
}
$handler->processEmail($mail);
$mail->setRelatedPHID($task->getPHID());

View file

@ -170,9 +170,11 @@ final class ManiphestReplyHandler extends PhabricatorMailReplyHandler {
->setExcludeMailRecipientPHIDs($this->getExcludeMailRecipientPHIDs())
->setContinueOnNoEffect(true)
->setContinueOnMissingFields(true)
->setContentSource($content_source)
->setApplicationEmail($this->getApplicationEmail())
->applyTransactions($task, $xactions);
->setContentSource($content_source);
if ($this->getApplicationEmail()) {
$editor->setApplicationEmail($this->getApplicationEmail());
}
$editor->applyTransactions($task, $xactions);
$event = new PhabricatorEvent(
PhabricatorEventType::TYPE_MANIPHEST_DIDEDITTASK,

View file

@ -2438,7 +2438,9 @@ abstract class PhabricatorApplicationTransactionEditor
$adapter = $this->buildHeraldAdapter($object, $xactions);
$adapter->setContentSource($this->getContentSource());
$adapter->setIsNewObject($this->getIsNewObject());
$adapter->setApplicationEmail($this->getApplicationEmail());
if ($this->getApplicationEmail()) {
$adapter->setApplicationEmail($this->getApplicationEmail());
}
$xscript = HeraldEngine::loadAndApplyRules($adapter);
$this->setHeraldAdapter($adapter);