mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 23:02:42 +01:00
Fix undefinded $changesets when submitting inline comments in Differential
Summary: Fixes T5262. This branch is overzealous, and causes us to fail to load changeses if `metamta.differential.unified-comment-context` is off. It was on for me locally for testing, which is why I missed this. Test Plan: No more exception. Reviewers: chad Reviewed By: chad Subscribers: richardvanvelzen, epriestley Maniphest Tasks: T5262 Differential Revision: https://secure.phabricator.com/D9376
This commit is contained in:
parent
0a7618f8b8
commit
ba2ce8a5ca
1 changed files with 9 additions and 8 deletions
|
@ -1284,19 +1284,20 @@ final class DifferentialTransactionEditor
|
||||||
$changeset_ids[$id] = $id;
|
$changeset_ids[$id] = $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($show_context) {
|
$changesets = id(new DifferentialChangesetQuery())
|
||||||
$hunk_parser = new DifferentialHunkParser();
|
->setViewer($this->getActor())
|
||||||
$changesets = id(new DifferentialChangesetQuery())
|
->withIDs($changeset_ids)
|
||||||
->setViewer($this->getActor())
|
->needHunks(true)
|
||||||
->withIDs($changeset_ids)
|
->execute();
|
||||||
->needHunks(true)
|
|
||||||
->execute();
|
|
||||||
}
|
|
||||||
|
|
||||||
$inline_groups = DifferentialTransactionComment::sortAndGroupInlines(
|
$inline_groups = DifferentialTransactionComment::sortAndGroupInlines(
|
||||||
$inlines,
|
$inlines,
|
||||||
$changesets);
|
$changesets);
|
||||||
|
|
||||||
|
if ($show_context) {
|
||||||
|
$hunk_parser = new DifferentialHunkParser();
|
||||||
|
}
|
||||||
|
|
||||||
$result = array();
|
$result = array();
|
||||||
foreach ($inline_groups as $changeset_id => $group) {
|
foreach ($inline_groups as $changeset_id => $group) {
|
||||||
$changeset = idx($changesets, $changeset_id);
|
$changeset = idx($changesets, $changeset_id);
|
||||||
|
|
Loading…
Reference in a new issue