mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Fix an initialization issue in VectorTree
Summary: Ref T13520. In unusual cases where there are no changes in a changeset list (e.g., empty commits) we can fatal when trying to iterate over an empty list of vectors. Test Plan: - Created an empty commit. - Used "git show | pbcopy" to create a diff from it. - Viewed it in the web UI. - Before: fatal when iterating on `null`. - After: clean page. Maniphest Tasks: T13520 Differential Revision: https://secure.phabricator.com/D21221
This commit is contained in:
parent
af9faba02f
commit
6937d38947
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
||||||
final class ArcanistDiffVectorTree
|
final class ArcanistDiffVectorTree
|
||||||
extends Phobject {
|
extends Phobject {
|
||||||
|
|
||||||
private $vectors;
|
private $vectors = array();
|
||||||
|
|
||||||
public function addVector(array $vector) {
|
public function addVector(array $vector) {
|
||||||
$this->vectors[] = $vector;
|
$this->vectors[] = $vector;
|
||||||
|
|
Loading…
Reference in a new issue