1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 16:30:59 +01:00

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 a1baedbd9a
commit 743f0d65ea
2 changed files with 10 additions and 1 deletions

View file

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

View file

@ -15,6 +15,15 @@ final class PhabricatorPHIDMailStamp
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();
$handles = $viewer->loadHandles($value);