1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-10 05:48:30 +01:00

(stable) Fix a mail stamp issue with blocking reviewers

Summary: Revisions with blocking reviewers had this stamp built incorrectly, which cascaded into trying to use `array()` as a PHID. Recover so these tasks succeed.

Test Plan: Will deploy production.

Differential Revision: https://secure.phabricator.com/D19082
This commit is contained in:
epriestley 2018-02-13 17:53:36 -08:00
parent c56bdc92a2
commit 708acce927
2 changed files with 10 additions and 1 deletions

View file

@ -53,7 +53,7 @@ final class DifferentialMailEngineExtension
} else { } else {
$reviewers[] = $reviewer_phid; $reviewers[] = $reviewer_phid;
if ($reviewer->isBlocking()) { if ($reviewer->isBlocking()) {
$reviewers[] = $blocking; $blocking[] = $reviewer_phid;
} }
} }
} }

View file

@ -15,6 +15,15 @@ final class PhabricatorPHIDMailStamp
return null; return null;
} }
// TODO: This recovers from a bug where blocking reviewers were serialized
// incorrectly into the flat mail stamp list in the worker queue as arrays.
// It can be removed some time after February 2018.
foreach ($value as $key => $v) {
if (is_array($v)) {
unset($value[$key]);
}
}
$viewer = $this->getViewer(); $viewer = $this->getViewer();
$handles = $viewer->loadHandles($value); $handles = $viewer->loadHandles($value);