1
0
Fork 0
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:
Bob Trahan 2013-10-10 15:17:37 -07:00
parent ff4fa1885b
commit db71bf6128

View file

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