mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 06:20:56 +01:00
Always provide a valid content source for DifferentialCommentEditor
Summary: Ref T2222. On the `tmp.differential` branch, we're currently having issues parsing commits which reference Differential revisions, because the "user closed this revision (closed by commit xyz)" message is fataling: [2014-02-13 14:12:36] EXCEPTION: (PhutilProxyException) Error while executing task ID 345358 from queue. {>} (AphrontQueryException) #1048: Column 'contentSource' cannot be null Specifically, the MessageParser pathway for CommentEditor doesn't set a content source. Make sure CommentEditor always sets a content source. (This is also causing a buildup of diffs on D8212 and D8211.) Auditors: btrahan
This commit is contained in:
parent
18938b5310
commit
0dc73d5d93
1 changed files with 7 additions and 1 deletions
|
@ -561,9 +561,15 @@ final class DifferentialCommentEditor extends PhabricatorEditor {
|
|||
->setRevision($revision);
|
||||
|
||||
if ($this->contentSource) {
|
||||
$template->setContentSource($this->contentSource);
|
||||
$content_source = $this->contentSource;
|
||||
} else {
|
||||
$content_source = PhabricatorContentSource::newForSource(
|
||||
PhabricatorContentSource::SOURCE_LEGACY,
|
||||
array());
|
||||
}
|
||||
|
||||
$template->setContentSource($content_source);
|
||||
|
||||
$comments = array();
|
||||
|
||||
// If this edit performs a meaningful action, save a transaction for the
|
||||
|
|
Loading…
Reference in a new issue