mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Fix issue reported from github
Summary: we filter the $actors above such that its possible to have no $actor anymore (if $actor is not a deliverable email address). ergo, make sure we have actor before we start calling methods. Fixes github issue 403 Test Plan: logic on this one - not 100% sure how to easily reproduce Reviewers: epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7284
This commit is contained in:
parent
ff4fa1885b
commit
db71bf6128
1 changed files with 7 additions and 4 deletions
|
@ -383,10 +383,13 @@ final class PhabricatorMetaMTAMail extends PhabricatorMetaMTADAO {
|
|||
switch ($key) {
|
||||
case 'from':
|
||||
$from = $value;
|
||||
$actor = $actors[$from];
|
||||
|
||||
$actor_email = $actor->getEmailAddress();
|
||||
$actor_name = $actor->getName();
|
||||
$actor_email = null;
|
||||
$actor_name = null;
|
||||
$actor = idx($actors, $from);
|
||||
if ($actor) {
|
||||
$actor_email = $actor->getEmailAddress();
|
||||
$actor_name = $actor->getName();
|
||||
}
|
||||
$can_send_as_user = $actor_email &&
|
||||
PhabricatorEnv::getEnvConfig('metamta.can-send-as-user');
|
||||
|
||||
|
|
Loading…
Reference in a new issue