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:
		| @@ -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'); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Bob Trahan
					Bob Trahan