From 040f934adf65705427ce910ed8d6a438944333e0 Mon Sep 17 00:00:00 2001 From: vrana Date: Wed, 29 Feb 2012 16:25:12 -0800 Subject: [PATCH] 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 --- .../filecontent/base/DiffusionFileContentQuery.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/applications/diffusion/query/filecontent/base/DiffusionFileContentQuery.php b/src/applications/diffusion/query/filecontent/base/DiffusionFileContentQuery.php index c4b6f332f1..a159a634f5 100644 --- a/src/applications/diffusion/query/filecontent/base/DiffusionFileContentQuery.php +++ b/src/applications/diffusion/query/filecontent/base/DiffusionFileContentQuery.php @@ -1,7 +1,7 @@ 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) {