1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 21:02:41 +01:00

Allow blaming of empty file in Diffusion

Summary: Blame of empty call currently throws AphrontQueryParameterException.

Test Plan: Blame empty file.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1734
This commit is contained in:
vrana 2012-02-29 16:25:12 -08:00
parent 94daf63ca5
commit 040f934adf

View file

@ -1,7 +1,7 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
* Copyright 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -110,9 +110,12 @@ abstract class DiffusionFileContentQuery {
$commit->getEpoch();
}
$commits_data = id(new PhabricatorRepositoryCommitData())->loadAllWhere(
'commitID IN (%Ls)',
mpull($commits, 'getID'));
$commits_data = array();
if ($commits) {
$commits_data = id(new PhabricatorRepositoryCommitData())->loadAllWhere(
'commitID IN (%Ls)',
mpull($commits, 'getID'));
}
$phids = array();
foreach ($commits_data as $data) {